LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-25-2008, 12:28 PM   #1
Pode
LQ Newbie
 
Registered: Oct 2008
Posts: 22

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


When I want to open acetoneiso's homepage I get this messege:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

root@PC1:/etc# ps -A | grep mysql
2733 ? 00:00:00 mysqld_safe
2765 ? 00:00:00 mysqld

I run
mysql_install_db --user=mysql

but solve the problem then i run these:

/etc/rc.d/rc.mysqld stop
rm -fR /var/lib/mysql/*
mysql_install_db --user=mysql
/etc/rc.d/rc.mysqld start

but nothing.

And I can't find mysql.sock file

Please help
 
Old 11-25-2008, 01:09 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
Maybe mysql runs fine (as shown with ps output)

Check it with mysql client:
Code:
mysql
mysql> status
 
Old 11-25-2008, 01:31 PM   #3
Pode
LQ Newbie
 
Registered: Oct 2008
Posts: 22

Original Poster
Rep: Reputation: 1
Thank for reply
I get this:

mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.51b, for slackware-linux-gnu (i486) using EditLine wrapper

Connection id: 1
Current database:
Current user: pode@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.51b-log Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/run/mysql/mysql.sock
Uptime: 1 hour 14 min 14 sec

Threads: 1 Questions: 4 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.001
 
Old 11-25-2008, 02:21 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
So, you see ? mysqld is running fine

Now what is "acetoneiso's homepage" ? how this page accesses to mysql ? with php ?
Have you set mysql root user password yet ?
Code:
mysqladmin -u root password "yourpassword"
mysqladmin -u root -h `hostname` password "yourpassword"

Last edited by keefaz; 11-25-2008 at 02:30 PM.
 
Old 11-25-2008, 02:30 PM   #5
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,025

Rep: Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966
Maybe the connection is expected through http, not through a unix socket.

Try commenting the line :

SKIP="--skip-networking"
e.g. write
#SKIP="--skip-networking"
instead

in /etc/rc.d/rc.mysqld

then restart mysql:
/etc/rc.d/rc.mysql restart

HTH

Last edited by Didier Spaier; 11-25-2008 at 02:32 PM.
 
Old 11-25-2008, 02:41 PM   #6
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
mysqld doesn't use port 80 (http) to communicate, it has its own port (generally TCP 3306)
I don't think open mysqld port will solve the issue here, but I don't know
 
Old 11-25-2008, 02:58 PM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,025

Rep: Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966Reputation: 966
Lightbulb

After a little googling I suppose you are trying to connect to this page:
http://www.acetoneiso.netsons.org/

If that is the case the message you get has nothing to do with your own settings, it's a problem with the host of the website you are visiting (I get the same result).

So forget my former post and send a message about this problem to acetoneiso if you can reach him/her.

Last edited by Didier Spaier; 11-25-2008 at 03:02 PM.
 
Old 11-25-2008, 02:58 PM   #8
Pode
LQ Newbie
 
Registered: Oct 2008
Posts: 22

Original Poster
Rep: Reputation: 1
Acetoneiso homepage:
http://www.acetoneiso.netsons.org/

Whit:
mysqladmin -u root password "yourpassword"
mysqladmin -u root -h `hostname` password "yourpassword"

I get :
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Uncommenting the SKIP="--skip-networking" line don't help
 
Old 11-25-2008, 03:01 PM   #9
Pode
LQ Newbie
 
Registered: Oct 2008
Posts: 22

Original Poster
Rep: Reputation: 1
thanks for helping
 
Old 11-25-2008, 03:41 PM   #10
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
For the password issue, you could reset it with:
(as root)
Code:
/etc/rc.d/rc.mysqld stop
mysqld_safe --skip-grant-tables &
mysqladmin -u root password "yourpassword"
mysqladmin -u root -h `hostname` password "yourpassword"
BTW, the mysql root user is not the same as your system root user, so try to use different password for mysql root user

Is http://www.acetoneiso.netsons.org/ hosted in your machine or it is an external server ?
 
1 members found this post helpful.
Old 11-25-2008, 04:12 PM   #11
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
EDIT: How do you connect? You can't connect from external host using socket (mysql.sock I mean).

Last edited by Alien_Hominid; 11-25-2008 at 04:15 PM.
 
Old 11-26-2008, 04:17 AM   #12
Pode
LQ Newbie
 
Registered: Oct 2008
Posts: 22

Original Poster
Rep: Reputation: 1
http://www.acetoneiso.netsons.org/ is not hosted in my machine.
I just can't open the page long time and because that I was thinking that the problem is on my machine but Didier Spaier says he get same messege so there is nothing to do.
Thanks for helping.
 
Old 11-26-2008, 08:21 AM   #13
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Sorry, but your local copy of mysql and the mysql error on that page are unrelated.
 
  


Reply


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
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mohadesz Linux - Server 3 03-15-2008 05:06 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mathimca05 Linux - Newbie 2 10-17-2007 02:04 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sunlinux Linux - Software 1 11-07-2006 12:08 AM


All times are GMT -5. The time now is 10:08 PM.

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