LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-25-2002, 01:03 AM   #1
norbs
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
socket=/tmp/mysql.sock

When I'm launching the daemon using
safe_mysql&
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, 01:40 AM   #2
rverlander
Member
 
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
 
  


Reply



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 07:40 PM
Error connecting to MySQL from PHP anindyanuri Linux - Software 18 04-24-2005 09:30 AM
Connecting to Mysql using PHP mahugl Linux - Software 1 01-31-2004 11:20 AM
mysql and connecting from php on apache with moregroupware seriv Linux - Software 1 07-25-2003 08:11 AM
I need help connecting to mysql with php Pete Dogg Programming 4 06-08-2003 12:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:06 AM.

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