LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP 5 wont connect to MySql (fedora (https://www.linuxquestions.org/questions/linux-software-2/php-5-wont-connect-to-mysql-fedora-287258/)

spacy2003 02-07-2005 08:31 AM

PHP 5 wont connect to MySql (fedora)
 
Ok, i've got Apache 2.0 installed with php 5 and mysql 4.1 (all installed with rpm's)
i installed the following php5, php5-pear, php-mysql, mysql-client, mysql-server,
mysql-max, mysql-shared-compat, mysql-administrator.

In the terminal mysqladmin works fine, # mysql ping --user=root --password=*** shows me:
mysqld is alive

So mysql is up and running.

Then the problem is maybe how i create my db's ?
Well i create a new folder with owner mysql and chmod 711
I guess this is okay cause mysqlshow --user=root --password=*** shows me
(Forum is the db i created):

Databases
mysql
forum

Then the problem must be with php here's my phpinfo part for mysql and the
loaded modules:

additional ini file parsed --> /etc/php.d/mysql.ini

active persistent links --> 0
active links --> 0
client version --> 4.1.9
mysql_moduletype --> external
mysql_socket --> /var/lib/mysql/mysql.sock
mysql_include --> -l/usr/include/mysql
mysql_libs --> -L/usr/lib/mysql -lmysqlclient

mysql.allow_persistent --> on --> on
mysql.connect_timeout --> 60 --> 60
mysql.default_host --> no value --> no value
mysql.default_password --> no value --> no value
mysql.default_port --> no value --> no value
mysql.default_socket --> no value --> no value
mysql.default_user --> no value --> no value
mysql.max_links --> inlimited --> unlimited
mysql.max_persistent --> unlimited --> unlimited
mysql.trace_mode --> off --> off

When i create a php file with mysql connect i get this error:
Cant connect to mysql thru /var/lib/mysql/mysql.sock

im really out of ideas atm :scratch:


All times are GMT -5. The time now is 11:28 PM.