LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2010, 10:19 PM   #1
bittenstate
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
LAMP install on Lucid, mysqld.sock missing, mysql terminating status=1


Apache and PHP5 seem to work fine. From terminal prompt as root getting error msgs.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I have chown and chmod'd the directories for both var/run and tmp
but no files are being created.
Also ps -ln | grep mysql returns nothing
I've removed and reinstalled mysql-server.
bind is set to localhost
I read one post about inetd using port 3306 but that doesn't seem to be the problem.

The daemonl.log repeats these lines
Dec 29 19:17:16 ubuntu init: mysql post-start process (12652) terminated with status 1
Dec 29 19:17:16 ubuntu init: mysql main process (12730) terminated with status 1
Dec 29 19:17:16 ubuntu init: mysql main process ended, respawning

Kernal log keeps adding this line.
Dec 29 19:08:11 ubuntu kernel: [ 3833.393457] type=1505 audit(1293678491.371:142): operation="profile_replace" pid=11344 name="/usr/sbin/mysqld"

The error.log from/var/log/mysql shows this
101229 19:11:43 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
101229 19:11:43 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101229 19:11:43 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

Can someone suggest debugging tricks to figure out this problem?
 
Old 12-29-2010, 10:49 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,885
Blog Entries: 18

Rep: Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347
Your mysql may be trying to use a non-standard socket.

Maybe this will help.

http://www.oreillynet.com/cs/user/view/cs_msg/83606
 
Old 12-30-2010, 07:19 PM   #3
bittenstate
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the suggestion but that use states
"i can access mysql with cocoamysql and through phpmyadmin no problem i have mysql-standard-4.1.12-"

I get the same error, no mysqld.sock when I access phpmyadmin.

I am running a dual boot, and the file system was ntfs (vista), an HP laptop.

I have used both apt-get install,remove, purge and the Synaptic Package Monitor.
Apache works
PHP info page works
MYSQL -V works
any mysql or mysqladmin command results in no mysqld.sock msg.
 
Old 12-30-2010, 08:55 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,885
Blog Entries: 18

Rep: Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347
Try this as root: whereis mysql.sock.
 
Old 12-30-2010, 10:55 PM   #5
whk
Member
 
Registered: Jun 2005
Posts: 202

Rep: Reputation: 35
Review everthing from this(tripple check):

https://help.ubuntu.com/community/Ap...&redirect=LAMP


hth and gl
 
Old 12-31-2010, 04:00 PM   #6
bittenstate
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks Frank, not sure what it told me

root@ubuntu:/# pwd
/
root@ubuntu:/# whereis mysqld.sock
mysqld: /usr/sbin/mysqld /usr/share/man/man8/mysqld.8.gz
root@ubuntu:/#

I created a /var/run/mysqld/mysqld.sock and chmodded it 755

What logs should I be checking?
 
Old 12-31-2010, 04:19 PM   #7
bittenstate
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
RE: LAMP doc

That is what I have been following, the packages all seemed to install ok -
I've made some scripts to display error msgs and file/pkg status
<?PHP
root@ubuntu:/# bash checkpkgs
check of LAMP dependencies
apt-get check apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check apache2-mpm-prefork
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check apache2-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check apache2.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libapr1
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libaprutil1
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libdbd-mysql-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libdbi-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libmysqlclient15off
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libnet-daemon-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libplrpc-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check libpq5
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check mysql-client-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check mysql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check mysql-server-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check php5-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-get check php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
checkpkgs completed
root@ubuntu:/#
?>
 
Old 12-31-2010, 08:40 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,885
Blog Entries: 18

Rep: Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347Reputation: 3347
Quote:
Originally Posted by bittenstate View Post
root@ubuntu:/# whereis mysqld.sock
mysqld: /usr/sbin/mysqld /usr/share/man/man8/mysqld.8.gz
It looks to me (I'm not an expert but I have messed with MySQL quite a bit) that it can't find mysql.sock. In other words, it couldn't find a socket.

In a default install of MySQL, it would be in /var, I think in /var/mysql.

How are you starting mysql?
 
Old 02-15-2011, 10:39 AM   #9
sitonico
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
Hi all,

I just got the same problem, and I cannot find out a solution. What happened with this problem finally?
Thanks in advance,

Alfonso.
 
Old 02-15-2011, 10:00 PM   #10
whk
Member
 
Registered: Jun 2005
Posts: 202

Rep: Reputation: 35
He did not know how to fire up MySQL which further research
on the database is a prerequisite.
sudo /etc/init.d/mysql restart

There are other commands for starting MySQL, BTW.
 
  


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
[SOLVED] MySQL Start Problem::::socket '/var/run/mysqld/mysqld.sock' (2) arun-linux Linux - Software 6 11-29-2012 07:56 AM
[SOLVED] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' Burningmace Linux - Server 5 09-06-2012 02:29 AM
mysql needs mysqld.sock? radiodee1 Linux - Server 10 01-25-2007 06:33 AM
Mysql Installation on Gentoo - mysqld.sock? Bob Gaskin Linux - Software 1 12-05-2003 12:27 AM
mysql.sock missing? bai_design Slackware 4 10-15-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration