[转帖]MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法 _MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2024 | 回复: 0   主题: [转帖]MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法         下一篇 
谁是天蝎
注册用户
等级:大元帅
经验:90210
发帖:106
精华:0
注册:2011-7-21
状态:离线
发送短消息息给谁是天蝎 加好友    发送短消息息给谁是天蝎 发消息
发表于: IP:您无权察看 2014-11-28 15:34:32 | [全部帖] [楼主帖] 楼主

1 问题

 [root@localhost mysql]# /etc/rc.d/init.d/mysql status

MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]

[root@localhost mysql]# /etc/rc.d/init.d/mysql start

Starting MySQL...The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).                              [FAILED]

2 原因

没有初始化权限表

 

3 解决办法

 #cd /usr/local/mysql(进入mysql安装目录)

#chown -R mysql.mysql .

#su - mysql

$cd server

$scripts/mysql_install_db

4 本人解决过程

 [root@localhost ~]# cd /usr/local/mysql

[root@localhost mysql]# chown -R mysql.mysql .

[root@localhost mysql]# su - mysql

[mysql@localhost ~]$ cd /usr/local/mysql

[mysql@localhost mysql]$ scripts/mysql_install_db

Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'

./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

./bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd ./mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

[mysql@localhost mysql]$ /usr/local/mysql/bin/mysqld_safe --user=mysql &

[1] 11767

[mysql@localhost mysql]$ 120502 07:01:17 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'.

120502 07:01:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[mysql@localhost mysql]$ /etc/rc.d/init.d/mysql status

MySQL running (11830)                                      [  OK  ]

[mysql@localhost mysql]$ /etc/rc.d/init.d/mysql start

Starting MySQL                                             [  OK  ]

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论