mysql啟動報錯Manager of pid-file quit without updating file.[FAILED]

myownstars發表於2011-08-01

linux採用rpm方式安裝mysql,預設都裝到根目錄下了,需要將其安裝路徑挪到/data目錄;

遷完後Mysql啟動時候報告錯誤,找不到pid檔案

[root@testdb2 oracle]# service mysql start

Starting MySQL..Manager of pid-file quit without updating file.[FAILED]

此時需要採用safe模式啟動

[root@testdb2 oracle]# which mysqld_safe

/usr/bin/mysqld_safe

[root@testdb2 oracle]# /usr/bin/mysqld_safe --user=mysql&

[1] 7301

[root@testdb2 oracle]# 110801 15:33:40 mysqld_safe Logging to '/var/lib/mysql/testdb2.err'.

110801 15:33:40 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

此時可以登入mysql

[root@testdb2 oracle]# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.1.51 MySQL Community Server (GPL)

 

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql> exit

Bye

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-703709/,如需轉載,請註明出處,否則將追究法律責任。

相關文章