MySQL Sock missing

Questions about applications and software
Forum rules
Before you post please read how to get help
BaronVonClop
Level 1
Level 1
Posts: 3
Joined: Mon Jun 03, 2013 4:22 pm

MySQL Sock missing

Postby BaronVonClop » Mon Jun 03, 2013 4:35 pm

Hi all,

Forgive me, I'm a beginner to a lot of Linux things. However, tutorials online have gotten me through near everything and I had gotten LAMP up and running using this tutorial. Everything was working great - I'd even learned enough commands to successfully install a mediawiki and got right to work. Everything was beautiful.

However now the issue I am running into is with MySQL. After rebooting the PC with Mint on it, my website now throws me this error:

(Can't contact the database server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (localhost))


I navigated to /var/run/mysqld/ and it is empty. There is no 'mysqld.sock' in the folder at all. I assume this is the problem, but I have no idea how to fix it. Uninstalling and reinstalling mysql-server and -client have gotten me no results. MySQL is running, as 'sudo service mysql start' gives me 'Job is already running: mysql' - but nothing can connect to it due to (I assume) the .sock file missing.

What do I need to do to generate a .sock file, or find out where it went to? It must be or have been somewhere, as MySQL worked fine before rebooting.

I appreciate any help,
Baron

EDIT: Apologies, I am running Linux Mint 14 64 bit.

BaronVonClop
Level 1
Level 1
Posts: 3
Joined: Mon Jun 03, 2013 4:22 pm

Re: MySQL Sock missing

Postby BaronVonClop » Tue Jun 04, 2013 1:00 am

Update with new info:

I have scoured Google for a good six hours trying everything I could find. I have tried changing it to search /var/lib/mysql/mysql.sock instead, no luck. I have searched /tmp/ for the .sock, nothing there. I have edited my.cnf with a dozen different "fixes," nothing.

I have gone as far as formatting my hard drive and completely reinstalling Linux Mint and installing everything from the ground up. It worked perfect! 100% correctly. Accessing through the domain, loading PHP, installing mediawiki - perfect. But as soon as I reboot the PC, all I get is...

(Can't contact the database server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (localhost))


I am literally at my wits end with this. So far, the only working solution that I have is to erase all my work, reformat my hard drive, and reinstall everything fresh anytime I need to reboot the PC. There must be something wrong with the tutorial, as that is the only possible thing that could replicate this exact same bug twice, but what?

Anything would help,
Baron

BrianD
Level 4
Level 4
Posts: 316
Joined: Fri Feb 12, 2010 12:22 am
Location: Tallahassee, Florida, USA

Re: MySQL Sock missing

Postby BrianD » Tue Jun 04, 2013 8:55 am

that socket usually doesn't exist unless the mysql daemon is running. did you set mysql to start automatically on boot?
need I say more??

BaronVonClop
Level 1
Level 1
Posts: 3
Joined: Mon Jun 03, 2013 4:22 pm

Re: MySQL Sock missing

Postby BaronVonClop » Tue Jun 04, 2013 2:09 pm

I didn't - the linked tutorial from Linux Mint's website completely skips over installing and configuring mysqld and mysql. So everything ran fine, but as soon as it rebooted (and so needed the sock) it all went to hell.

I ended up fixing it by switching to Ubuntu (sorry) and following this guide instead.

User avatar
DataMan
Level 6
Level 6
Posts: 1234
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Midwest USA at /var/www
Contact:

Re: MySQL Sock missing

Postby DataMan » Tue Jun 04, 2013 4:18 pm

I think my short install paper is a bit more concise. It works in all versions of Mint from 9->14.

http://www.boomerclan.info/techpaperslx/72-lamp-server-installation.html

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015

tassiebear
Level 1
Level 1
Posts: 1
Joined: Fri Oct 18, 2013 3:11 am

Re: MySQL Sock missing

Postby tassiebear » Fri Oct 18, 2013 8:03 am

I am having a very similar problem. I installed Mint 15 in August and had things humming ever since...until last night, when MySQL just stopped working. I have tried everything, nothing seems to work. Mint did some updates yesterday and I suspect one of the updates have made a change that trashed my MySQL configuration.

A while back I heard of a fix involving the headers, but I can't find this or any other solution. So I'm stuck....can't do anything involving MySQL.

Any ideas???


Return to “Software & Applications”