LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LAMP install on Lucid, mysqld.sock missing, mysql terminating status=1 (https://www.linuxquestions.org/questions/linux-newbie-8/lamp-install-on-lucid-mysqld-sock-missing-mysql-terminating-status%3D1-853152/)

bittenstate 12-29-2010 09:19 PM

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?

frankbell 12-29-2010 09:49 PM

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

bittenstate 12-30-2010 06:19 PM

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.

frankbell 12-30-2010 07:55 PM

Try this as root: whereis mysql.sock.

whk 12-30-2010 09:55 PM

Review everthing from this(tripple check):

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


hth and gl

bittenstate 12-31-2010 03:00 PM

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?

bittenstate 12-31-2010 03:19 PM

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:/#
?>

frankbell 12-31-2010 07:40 PM

Quote:

Originally Posted by bittenstate (Post 4209056)
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?

sitonico 02-15-2011 09:39 AM

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.

whk 02-15-2011 09:00 PM

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.


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