Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-25-2002, 02:03 AM   #1
LQ Newbie
Registered: Jul 2002
Location: france
Distribution: redhat
Posts: 6

Rep: Reputation: 0
connecting mysql by php

After spending many hours on configuring Apache+Mysql+php
I still encounter probs.
I've installed using Mysql RPMs and done a static install for Apache and php and it works (RH 7.3)

here the only problem

When I'm trying to connect mysql database using php, it says something like :
Waring : could not connect to local mysql server through /tmp/mysql.sock

so I've edit the my.cnf and put

When I'm launching the daemon using
and then trying to connect using
mysql -u root -pxxxxxx
it says that he can't connect to /var/lib/mysql/mysql.sock ??!!

and I can't user mysqladmin -u root -pxx shutdown to close it and I can't shut it using kill -9 !!!
so I'm restarting everytime....

Thanks for helping
Old 07-25-2002, 02:40 AM   #2
Registered: May 2002
Distribution: A few
Posts: 488

Rep: Reputation: 30
PHP isn't compiled with MySQL support.

To compile PHP with MySQL RPM support re-compile PHP and add: --with-mysql=/usr

also for rpm mysql the startup script is not safe_mysqld, its /etc/rc.d/init.d/mysqld (or just mysql?) start


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
probs with connecting to mysql database using php ankscorek Linux - Software 4 08-16-2005 08:40 PM
Error connecting to MySQL from PHP anindyanuri Linux - Software 18 04-24-2005 10:30 AM
Connecting to Mysql using PHP mahugl Linux - Software 1 01-31-2004 12:20 PM
mysql and connecting from php on apache with moregroupware seriv Linux - Software 1 07-25-2003 09:11 AM
I need help connecting to mysql with php Pete Dogg Programming 4 06-08-2003 01:52 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration