LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Closed Thread
 
Search this Thread
Old 11-23-2004, 09:11 AM   #1
MattJohnson
LQ Newbie
 
Registered: Nov 2004
Posts: 13

Rep: Reputation: 0
PHP Problems with Mysql


Hi
I just installed PHP and Mysql with apache as usual, I have a problem
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
origiinally my mysql.sock was in /tmp so i created a symbolic link to /var/lib/mysql and still the same error. I've tried everything and the sock file is definately there, but php can't get a connection from it. I try running the mysql client program using the --socket option and that works through either socket so the socket definatley points to the connection.

Does anyone know why this wouldn't work through php when it works through the command line client. PHP is recognising the mysql commands, but just not connecting.

I tried changing the permissions on the file and directory, still no luck. Anyone got any suggestions would be really appreciates

thanks
Matt Johnson
 
Old 11-23-2004, 09:17 AM   #2
halo14
Senior Member
 
Registered: Apr 2004
Location: Surprise, AZ
Distribution: Debian | CentOS | Arch
Posts: 1,103

Rep: Reputation: 45
So you do have the MySQL section of you phpinfo() page?? If you're not getting that.. than you need to edit your PHP config for MySQL..
 
Old 11-23-2004, 09:45 AM   #3
MattJohnson
LQ Newbie
 
Registered: Nov 2004
Posts: 13

Original Poster
Rep: Reputation: 0
I do have a mysql section:

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.58
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient

that looks ok, anyone see anything funny?
 
Old 11-23-2004, 11:12 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

http://www.linuxquestions.org/questi...01#post1309701

This your original post, this one is being closed.
 
  


Closed Thread


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
mysql-php-apache problems.. khuti2005 Linux - Newbie 4 10-20-2005 03:28 PM
problems in installing php with mysql krunal Linux - Newbie 3 08-18-2005 08:38 AM
Php, mysql, nvidia problems rohmanovich Linux - Software 2 04-01-2005 04:18 AM
PHP Problems with Mysql MattJohnson Linux - Networking 1 11-23-2004 09:19 AM
php and mysql problems punt Linux - Software 9 03-04-2003 09:23 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration