LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-20-2008, 09:18 AM   #1
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Rep: Reputation: 15
mysql can't find .sock after restart


Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I have a mysql database installed on an external hd and when I re-install mysql with the following my.cnf file settings, it reads the database just fine:

user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /media/disk/mysql
tmpdir = /media/disk/mysql/tmp
language = /usr/share/mysql/english
skip-external-locking

However, when I restart the cpu I get the following error

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I can re-install mysql and it will again run just fine??

TIA
 
Old 02-20-2008, 10:41 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
scroll down to this page and you'll see a lot of identical threads.

don't reinstall, just probably not actually got the service running. "service mysql start" or whatever that command should be in a gui.
 
Old 02-26-2008, 02:14 PM   #3
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Original Poster
Rep: Reputation: 15
Not sure I understand your post. I don't have "service" if I do a mysql start I get the same error as posted?
 
Old 02-26-2008, 02:59 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
mysql is a standard client server architecture. "mysql" is the client, "mysqld" is the server (the daemon). you need mysqld running in order for mysql to have something to connect to. that's what a service script does. you can also run "/etc/init.d/mysql start" or *a variation* thereof, or, as above, a gui equivalent.
 
  


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
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
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:42 PM.

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