Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30th August 2005, 07:53 AM
jerox Offline
Registered User
 
Join Date: Aug 2005
Posts: 3
Unhappy PHP and MySQL error

Hi, I get this error on PHP when I try to connect to MySQL server, any ideas?

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

I'm on FC3, with MYSQL:
mysql Ver 14.9 Distrib 5.0.3-beta, for pc-linux-gnu (i686),

The mysql server is running, as I'm connected to it on another terminal.

Thanks!
Reply With Quote
  #2  
Old 30th August 2005, 09:49 AM
komi Offline
Registered User
 
Join Date: Dec 2004
Location: Zistersdorf, Austria
Age: 26
Posts: 181
Does the file
/var/lib/mysql/mysql.sock
exists when the sqlserver is running?
__________________
Desktop:
OS: Fedora Core 5
Kernel: 2.6.17
on a HP Compaq dc5100 MT with 1 GB RAM, 3.2 GHz Pentium 4 HT

Notebook:
OS: Ubuntu Dapper Drake
on a HP Compaq nc8230 with 1 GB RAM, 2.1 GHz Pentium 4

My homepage: http://www.komendera.com/
My company's homepage and blog
We do branding, marketing, print stuff, advertising,
web apps and a lot more.
Reply With Quote
  #3  
Old 30th August 2005, 02:44 PM
jerox Offline
Registered User
 
Join Date: Aug 2005
Posts: 3
yes, it does:
srwxrwxrwx 1 mysql mysql 0 Aug 30 08:36 /var/lib/mysql/mysql.sock
I'm wonderig if ther's any place where I can look up for error (13) ?
Reply With Quote
  #4  
Old 30th August 2005, 02:46 PM
jerox Offline
Registered User
 
Join Date: Aug 2005
Posts: 3
I'm using this version of PHP, does it has to do anything with it?
[root@user-0vvdbsl html]# rpm -qa | grep php
php-ldap-4.3.9-2
php-odbc-4.3.9-2
php-4.3.9-2
php-pear-4.3.9-2
php-mysql-4.3.9-2
[
Reply With Quote
  #5  
Old 30th August 2005, 03:22 PM
komi Offline
Registered User
 
Join Date: Dec 2004
Location: Zistersdorf, Austria
Age: 26
Posts: 181
maybe this can help you:
http://forums.devshed.com/showthread.php?t=14130
__________________
Desktop:
OS: Fedora Core 5
Kernel: 2.6.17
on a HP Compaq dc5100 MT with 1 GB RAM, 3.2 GHz Pentium 4 HT

Notebook:
OS: Ubuntu Dapper Drake
on a HP Compaq nc8230 with 1 GB RAM, 2.1 GHz Pentium 4

My homepage: http://www.komendera.com/
My company's homepage and blog
We do branding, marketing, print stuff, advertising,
web apps and a lot more.
Reply With Quote
  #6  
Old 4th September 2005, 08:34 PM
cedid Offline
Registered User
 
Join Date: Apr 2005
Location: another world
Posts: 17
Question

hello guys,

I am having a similar problem, i can't start mysqld, it gives me error :

/root > service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
/root > cd /usr ; /usr/bin/safe_mysqld &
[1] 9748
/usr > Starting mysqld daemon with databases from /var/lib/mysql
050904 12:25:29 mysqld ended

[1]+ Done /usr/bin/safe_mysqld
/usr > service mysqld status
mysqld dead but subsys locked
/usr > service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
/usr > mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

/var/lib/mysql > ls -al
total 20564
drwxr-xr-x 4 mysql mysql 4096 Sep 4 12:31 .
drwxr-xr-x 22 root root 4096 Aug 24 05:41 ..
-rw-rw---- 1 mysql mysql 10485760 Aug 24 05:57 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Aug 24 06:12 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Aug 24 05:47 ib_logfile1
drwx------ 2 mysql mysql 4096 Aug 24 05:41 mysql
srwxrwxrwx 1 mysql mysql 0 Sep 4 12:31 mysql.sock
drwx------ 2 mysql mysql 4096 Aug 24 05:41 test

what am i missing, any suggestions ? PS. my SELinux is disabled
Reply With Quote
  #7  
Old 4th September 2005, 11:52 PM
smfinley's Avatar
smfinley Offline
Retired Community Manager
 
Join Date: Jul 2004
Posts: 1,335
Verify that your host in /etc/hosts and /etc/sysconfig/network agree with your host (domain) set up in MySQL and httpd. You may also have to disable SELinux for the httpd daemon. Also make sure that the httpd and mysqld daemons are configured to start as services automatically. See the web server and MySQL sections of FC4 Notes and FC3 Notes.
__________________
Stanton Finley
stanton-finley.net
Reply With Quote
  #8  
Old 5th September 2005, 02:13 AM
cedid Offline
Registered User
 
Join Date: Apr 2005
Location: another world
Posts: 17
Quote:
Originally Posted by smfinley
Verify that your host in /etc/hosts and /etc/sysconfig/network agree with your host (domain) set up in MySQL and httpd. You may also have to disable SELinux for the httpd daemon. Also make sure that the httpd and mysqld daemons are configured to start as services automatically. See the web server and MySQL sections of FC4 Notes and FC3 Notes.
I was going by those FC3 notes, but it didn't even start the mysqld service. I am not sure whether I did somewhere a mistake while I was playing around to configure it by myself. But I know I removed something, this was what i did before trying the instructions on your page :

/usr > rpm -e mysql-3.23.58-16

and it removed that package. Now when I type :

/usr > rpm -qa | grep mysql
mysql-debuginfo-3.23.58-16.FC3.1
mysql-devel-3.23.58-13
mysql-3.23.58-16.FC3.1
mysql-server-3.23.58-16.FC3.1
libdbi-dbd-mysql-0.6.5-9
mysql-devel-3.23.58-16.FC3.1
mysql-bench-3.23.58-16.FC3.1

As you see mysql-3.23.58-16 is not there anymore. Do you think that's causing the problem?

When I type :
/usr > mysql -u root
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

So, I can't apply the configuration instructions on your page...

Last edited by cedid; 5th September 2005 at 02:16 AM.
Reply With Quote
Reply

Tags
error, mysql, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP/MySQL error.... DaFoot Servers & Networking 2 22nd June 2009 02:22 PM
mySQL error timmy Servers & Networking 13 26th April 2007 04:07 AM
MySQL gives me the fallowing error "ERROR 1049 (42000): Unknown database 'start'" Rockafella Using Fedora 2 2nd July 2006 08:17 AM


Current GMT-time: 13:22 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat