This is a discussion on Cannot start mysqld and mysql within the MySQL forums, part of the Database Server Software category; --> Ok, I know this is a newbie question, so I googled and followed every step at http://forums.mysql.com/read.php?11,...7569#msg-57569 http://forums.mysql.com/read.php?11,38797,38797 but ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Ok, I know this is a newbie question, so I googled and followed every step at http://forums.mysql.com/read.php?11,...7569#msg-57569 http://forums.mysql.com/read.php?11,38797,38797 but I still have the problem. [root@myserver bin]# ./mysqld_safe --user=mysql Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 071119 13:53:56 mysqld ended [root@myserver bin]# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) I've done chown -R mysql:mysql /var/lib/mysql (although I don't understand why) I've noticed that there is already a mysql.sock at /var/lib/mysql and I don't know how to use mysql.server instead of mysqld_safe help please!! |
| |||
| On Mon, 19 Nov 2007 10:58:38 -0800 (PST), Rob wrote: > Ok, I know this is a newbie question, so I googled and followed every > step at > http://forums.mysql.com/read.php?11,...7569#msg-57569 > http://forums.mysql.com/read.php?11,38797,38797 > > but I still have the problem. > [root@myserver bin]# ./mysqld_safe --user=mysql > Starting mysqld daemon with databases from /var/lib/mysql Server starts... > STOPPING server from pid file /var/run/mysqld/mysqld.pid > 071119 13:53:56 mysqld ended And server quits... > > [root@myserver bin]# mysql > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/var/lib/mysql/mysql.sock' (111) The server quit. Is there any reason to expect to be able to connect to a server that isn't running? > I've done chown -R mysql:mysql /var/lib/mysql (although I don't > understand why) > I've noticed that there is already a mysql.sock at /var/lib/mysql > and I don't know how to use mysql.server instead of mysqld_safe > > help please!! Find logs. Figure out from them why the server is quitting. Fix that. -- CS is about lofty design goals and algorithmic optimization. Sysadmining is about cleaning up the fscking mess that results. |
| ||||
| > I've done chown -R mysql:mysql /var/lib/mysql (although I don't > understand why) I recently ran into this problem with building MySQL with plugin support (since RPM builds didn't support it). The reason you did chown -R mysql:mysql was to assign ownership and group to the files. This prevents individuals who are not mysql, or within the mysql group from editing the files (depending on the chmod permissions). First, if MySQL isn't running.. make sure the PID and sock file are gone: rm /var/run/mysqld/mysqld.pid rm /var/lib/mysql/mysql.sock Then try your mysql_safe.. if it doesn't work, try also doing: chown mysql:root /var/run/mysqld chmod 755 /var/run/mysqld Regards, Michael Martinek |