You are not logged in.

#1 2010-02-18 22:37:41

leberyo
Member
Registered: 2009-12-30
Posts: 123

Mysql won't start

Well, it was working yesterday but not today.  When I run sudo /etc/rc.d/mysqld restart it fails.  So I type;

mysqld_safe --user=mysql

I get:

100218 14:36:00 mysqld_safe Logging to '/var/lib/mysql/Arch.err'.
100218 14:36:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe: line 100: /var/lib/mysql/Arch.err: Permission denied
rm: cannot remove `/var/lib/mysql/Arch.pid': Permission denied
/usr/bin/mysqld_safe: line 137: /var/lib/mysql/Arch.err: Permission denied
100218 14:36:00 mysqld_safe mysqld from pid file /var/lib/mysql/Arch.pid ended
/usr/bin/mysqld_safe: line 100: /var/lib/mysql/Arch.err: Permission denied

and when I run:

mysql -u root

I get:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[viktor@Arch ~]$ mysqld --verbose
100218 14:08:01 [Warning] Can't create test file /var/lib/mysql/Arch.lower-test
100218 14:08:01 [Warning] Can't create test file /var/lib/mysql/Arch.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
100218 14:08:01 [ERROR] Aborting

100218 14:08:01 [Note] mysqld: Shutdown complete

Any idea what the problem might be?

Offline

#2 2010-02-18 22:44:32

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Mysql won't start

Did you check permissions on the related files/dirs it's complaining about?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2010-02-18 22:49:12

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: Mysql won't start

It says owner mysql (Read & Write), group mysql Access None.

Offline

#4 2010-02-18 23:10:51

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: Mysql won't start

This may seem silly, but have you verified that the MySQL server is running?

Verify using 'ps -ef | grep mysql'. You should see something like:

$ ps -ef |grep mysql
root      5325     1  0 13:09 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     5413  5325  0 13:09 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      5415  5325  0 13:09 ?        00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld

Offline

#5 2010-02-18 23:12:07

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: Mysql won't start

When I "sudo /etc/rc.d/mysqld start" I get "FAIL"

Offline

#6 2010-02-18 23:22:08

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: Mysql won't start

I got it!  Checked the logs.  My /var partition is full, duh.
How can I increase the size of this partition?  I tried using gparted but the partitition\resize option is greyed out and it won't let me unmount the partition.

Offline

#7 2010-02-18 23:44:07

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: Mysql won't start

leberyo wrote:

I got it!  Checked the logs.  My /var partition is full, duh.
How can I increase the size of this partition?  I tried using gparted but the partitition\resize option is greyed out and it won't let me unmount the partition.

You have to do it with a live CD.

Offline

#8 2010-04-27 15:54:39

sacarde
Member
Registered: 2006-07-14
Posts: 389

Re: Mysql won't start

leberyo wrote:

I got it!  Checked the logs.
...

in which log have find error?

Offline

#9 2010-04-27 19:50:57

avoulk
Member
From: Greece
Registered: 2007-08-28
Posts: 132
Website

Re: Mysql won't start

MyQSL logs the errors in

/var/lib/mysql/<hostname>.err

smile

Offline

#10 2010-04-27 20:36:43

sacarde
Member
Registered: 2006-07-14
Posts: 389

Re: Mysql won't start

this is my:

100427 22:35:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100427 22:35:50 [Note] Plugin 'FEDERATED' is disabled.
100427 22:35:50 [Note] Plugin 'ndbcluster' is disabled.
100427 22:35:50  InnoDB: Started; log sequence number 0 44233
100427 22:35:50 [ERROR] Can't start server : Bind on unix socket: Permission denied
100427 22:35:50 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
100427 22:35:50 [ERROR] Aborting

100427 22:35:50  InnoDB: Starting shutdown...
100427 22:35:55  InnoDB: Shutdown completed; log sequence number 0 44233
100427 22:35:55 [Note] /usr/sbin/mysqld: Shutdown complete

100427 22:35:55 mysqld_safe mysqld from pid file /var/lib/mysql/arch64.pid ended

Offline

#11 2010-04-28 07:15:37

sacarde
Member
Registered: 2006-07-14
Posts: 389

Re: Mysql won't start

I solved by this:

chown mysql /var/run/mysqld

Offline

Board footer

Powered by FluxBB