Installation of MySQL on Linux with PHP

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Installation of MySQL on Linux with PHP

Post by Nunners »

Hi Folks,

I've jsut setup a brand new development box, however I'm having serious problems getting MySQL working with PHP.

The server is running FC4, with MySQL v4.1.12 and PHP v5.05 and Apache v2.0.54. I've started the mysqld service, but I'm sitll getting the error:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/index.php on line 5
Could not connect: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
I can get mysql from the actual server, via ssh terminal.

Can anyone suggest anything?

Cheers
Nunners
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I had this problem a while ago. I can't remember what the solution was, but I know I found it by Googling for it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

Think I've worked out the problem. When I installed MySQL, using yum, I only installed the Client... not the server!
Post Reply