LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-31-2010, 05:34 PM   #1
bittenstate
LQ Newbie
 
Registered: Dec 2010
Posts: 6

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


Can't get MYSQL running

Ubuntu 10.04, linux 2.6.32-27-generic, 2G mem, intel duo T5250 1.5 ghz
dual boot with Vista

Apache2 works fine, PHP info page shows up, mysql -V works
mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64) using readline 6.1
ha

Error msgs
mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64) using readline 6.1
hannah@ubuntu:~$ sudo mysql -u root -p
[sudo] password for hannah:
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)
hannah@ubuntu:~$

I have chmoded /etc/mysql and /tmp, put a link from /tmp to /var/run/mysqld
Some posts use mysql/mysql.sock, others show myslqd/mysqld.sock, which is correct for Ubuntu?

my.cnf info
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep socket
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
#socket = /var/run/mysqld/mysqld.sock
socket = /tmp/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
socket = /tmp/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
socket = /tmp/mysqld.sock
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep port
# One can use all long options that the program supports.
# It has been reported that passwords should be enclosed with ticks/quotes
port = 3306
port = 3306
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep dir
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
!includedir /etc/mysql/conf.d/
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep addr
#bind-address = 192.168.1.20
bind-address = 127.0.0.1
#bind-address = localhost

I have created a mysql dir in /var/run, but it disappears when i reboot.

Here are the log files msgs
kern.log
-rw-r----- 1 syslog adm 2657550 2010-12-31 15:11 /var/log/kern.log
Dec 31 15:06:54 ubuntu kernel: [ 1954.728774] type=1505 audit(1293836814.701:82): operation="profile_replace" pid=6655 name="/usr/sbin/mysqld"
Dec 31 15:07:24 ubuntu kernel: [ 1985.003696] type=1505 audit(1293836844.981:83): operation="profile_replace" pid=6729 name="/usr/sbin/mysqld"
Dec 31 15:07:55 ubuntu kernel: [ 2015.276972] type=1505 audit(1293836875.251:84): operation="profile_replace" pid=6807 name="/usr/sbin/mysqld"
Dec 31 15:08:25 ubuntu kernel: [ 2045.554549] type=1505 audit(1293836905.531:85): operation="profile_replace" pid=6886 name="/usr/sbin/mysqld"
Dec 31 15:08:55 ubuntu kernel: [ 207

5.831692] type=1505 audit(1293836935.811:86): operation="profile_replace" pid=6978 name="/usr/sbin/mysqld"
Dec 31 15:09:26 ubuntu kernel: [ 2106.107412] type=1505 audit(1293836966.081:87): operation="profile_replace" pid=7061 name="/usr/sbin/mysqld"
Dec 31 15:09:56 ubuntu kernel: [ 2136.383562] type=1505 audit(1293836996.361:88): operation="profile_replace" pid=7139 name="/usr/sbin/mysqld"
Dec 31 15:10:26 ubuntu kernel: [ 2166.660813] type=1505 audit(1293837026.633:89): operation="profile_replace" pid=7214 name="/usr/sbin/mysqld"
Dec 31 15:10:56 ubuntu kernel: [ 2196.938785] type=1505 audit(1293837056.913:90): operation="profile_replace" pid=7288 name="/usr/sbin/mysqld"
Dec 31 15:11:27 ubuntu kernel: [ 2227.213716] type=1505 audit(1293837087.191:91): operation="profile_replace" pid=7362 name="/usr/sbin/mysqld"
----------------------------------------------------------------------
sys.log
-rw-r----- 1 syslog adm 392717 2010-12-31 15:11 /var/log/syslog
Dec 31 15:10:26 ubuntu init: mysql main process (7218) terminated with status 1
Dec 31 15:10:26 ubuntu init: mysql main process ended, respawning
Dec 31 15:10:56 ubuntu init: mysql post-start process (7219) terminated with status 1
Dec 31 15:10:56 ubuntu kernel: [ 2196.938785] type=1505 audit(1293837056.913:90): operation="profile_replace" pid=7288 name="/usr/sbin/mysqld"
Dec 31 15:10:56 ubuntu init: mysql main process (7292) terminated with status 1
Dec 31 15:10:56 ubuntu init: mysql main process ended, respawning
Dec 31 15:11:27 ubuntu init: mysql post-start process (7293) terminated with status 1
Dec 31 15:11:27 ubuntu kernel: [ 2227.213716] type=1505 audit(1293837087.191:91): operation="profile_replace" pid=7362 name="/usr/sbin/mysqld"
Dec 31 15:11:27 ubuntu init: mysql main process (7366) terminated with status 1
Dec 31 15:11:27 ubuntu init: mysql main process ended, respawning
----------------------------------------------------------------------
apache2 error.log
-rw-r----- 1 root adm 42847 2010-12-31 14:40 /var/log/apache2/error.log
[Fri Dec 31 14:34:41 2010] [error] mod_log_sql: insufficient configuration info to establish database link
[Fri Dec 31 14:34:41 2010] [error] mod_log_sql: child spawned but unable to open database link
[Fri Dec 31 14:40:37 2010] [error] mod_log_sql: insufficient configuration info to establish database link
[Fri Dec 31 14:40:37 2010] [error] mod_log_sql: child spawned but unable to open database link
[Fri Dec 31 14:40:40 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Fri Dec 31 14:40:49 2010] [error] [client 127.0.0.1] File does not exist: /var/www/~user
[Fri Dec 31 14:40:49 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Fri Dec 31 14:40:50 2010] [error] mod_log_sql: insufficient configuration info to establish database link
[Fri Dec 31 14:40:50 2010] [error] mod_log_sql: child spawned but unable to open database link
[Fri Dec 31 14:40:52 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
----------------------------------------------------------------------
Here's the msql error log

101231 15:21:32 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
101231 15:21:32 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101231 15:21:32 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.
101231 15:22:03 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
101231 15:22:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101231 15:22:03 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.
root@ubuntu:/#

Can someone point me to a detailed description of how mysql and/or php5 create a socket? Thanks.
 
Old 12-31-2010, 07:56 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Disclaimer: I am not a DBA. I know enough about databases to have a large aspirin budget. But here goes . . . .

MySQL creates a file called mysql.sock. That's the "socket" for connecting to MySQL.

In a normal installation, I think it's in /var/mysql. In a XAMPP installation, I know it's in /opt/lampp/var/mysql.

Here's what the MySQL docs have to say:

http://dev.mysql.com/doc/refman/5.0/...ysql-sock.html

I don't know that I've ever seen it in /tmp, as they describe, but I've only dealt with my own servers.

The command whereis mysql.sock as root might turn it up, but I don't think your mysql is getting enough started to actually create a socket.

Are you starting mysql under root privileges? Not doing so might explain the "no access" errors you are getting.
 
  


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
[SOLVED] MySQL Start Problem::::socket '/var/run/mysqld/mysqld.sock' (2) arun-linux Linux - Software 6 11-29-2012 06:56 AM
[SOLVED] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' Burningmace Linux - Server 5 09-06-2012 01:29 AM
[SOLVED] LAMP install on Lucid, mysqld.sock missing, mysql terminating status=1 bittenstate Linux - Newbie 9 02-15-2011 09:00 PM
mysql needs mysqld.sock? radiodee1 Linux - Server 10 01-25-2007 05:33 AM
Mysql Installation on Gentoo - mysqld.sock? Bob Gaskin Linux - Software 1 12-04-2003 11:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 AM.

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