Results 1 to 2 of 2
I am trying to configure PHP with mySQL support. I have looked a many sites on the internet and I follow their instructions. However I installed Apache without any problems ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-20-2004 #1
- Join Date
- Mar 2004
Installing Apache + MySql + PHP
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!
This could be a problem? Also it ends with a shell prompt saying :
Starting mysqld daemon with databases from /var/lib/mysql
040320 10:53:17 mysqld ended
and hangs until I press enter and it gives me a shell prompt again.
When I try and setup a database with mysql -u root -p it prompts for password (there isn't one!) and then I press carriage return and it gives me this error:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
I have changed all the owner and groups by doing chown -R. Can someone please guide me in the right direction?
Ideally I want to run Apache, MySQL and PHP so that my website can run PHP scripts. I had it working before but everytime I opened the site it would not find certain functions and I figured out that php hadn't been installed with mySql support. So I erased the package and am trying to build form the source tar.gz's for the three packages.
So far only apache is working right.
Once again any help will be appreciated
- 03-20-2004 #2
- Join Date
- Jan 2003
- Cardiff, Wales
Firstly, I would always use your distros software manager to install Mysql, Apache & php as this will configure most of it. for example you will probably want php_mod_sql etc.
You need to launch the mysql server as a daemon which is probably inside /etc/init.d - I use my services GUI to start and stop it. What distro are you using. In fedora or redhat its System settings / server settings / services then click mysql and start
I get errors launching if I try and run mysqld as a normal user or root. although I can run /etc/init.d/mysql start as root and it will run.
on a base install there should be a root user without a password so you just need to launch the client using mysql -u root. adding the -p option only seems to work if there is a password. and pressing enter = null password as opposed to using password = no.
although you probably want to add another user and set up their access rights to be a little more restrictive.
Anyway, I would try and use a package manager to setup mysql and php as it will be easier in the long run. Sorry if i've gone off at a tangent and none of my chatter has been helpful.No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.