PDA

View Full Version : Config PHP with MySQL


ProTrooper
5th October 2005, 17:52
I have a quick question. If I am going to have an external MySQL server (ie not on localhost) do I need to install PHP with "--with-mysql"? If so, what part of MySQL do I need installed on localhost to have the client libraries?

Thanks,
James

falko
5th October 2005, 18:25
I have a quick question. If I am going to have an external MySQL server (ie not on localhost) do I need to install PHP with "--with-mysql"?

You always need that if you want to work with MySQL in PHP!

If so, what part of MySQL do I need installed on localhost to have the client libraries?

Thanks,
James
You should install the MySQL-devel packages to be able to compile PHP with MySQL. Please have a look at "The Perfect Setup" series on HowtoForge. I'm sure your distribution is also covered there, and the howtos show how to install the appropriate MySQL-devel package.

ProTrooper
5th October 2005, 21:03
Okay thanks. I am doing a different setup than the "perfect setup" on a CentOS. I am trying to have a seperate database server.

mysql is a dependacy of mysql-devel. So do I need to install mysql server but just not run it?

till
6th October 2005, 11:25
I'am not shure how CentOS named the packages, but mysql is mostly the name of the mysql (client) librarys and mysql-server is the name of the mysql server so you must install the mysql package to get a working PHP + mysql installation.

falko
6th October 2005, 11:33
If CentOS is using the same package names than Fedora, then the packages you have to install are:
mysql, mysql-devel, mysql-server