StupidBeauty
Read times:627Posted at:Wed Mar 20 04:17:47 2013
- no title specified

转载用MySQL数据库文件恢复MySQL数据

MySQL启动失败,多半是因为数据库文件目录的权限不对。默认 的数据库文件目录是/var/lib/mysql,所有者应当为mysql组的mysql用户。

http://www.cytisec.com/?p=57014

亮点

由提示信息可知是数据库文件权限导致了MySQL服务器启动失败。

cd /var/lib/mysql
ls -l

[root@localhost mysql]# ls -l

-rw-r—–. 1 root root 27262976 7月 11 00:40 ibdata1

rw-r—–. 1 root root 5242880 7月 11 00:40 ib_logfile0

-rw-r—–. 1 root root 5242880 7月 11 00:40 ib_logfile1

drwx——. 2 root root 4096 7月 11 00:40 mydata

drwx——. 2 root root 4096 7月 11 00:40 mysql

drwx——. 2 root root 4096 7月 11 00:40 test

drwx——. 2 root root 4096 7月 11 00:40 wiki

drwx——. 2 root root 4096 7月 11 00:40 wu

若看到文件所有者为root,应该是使用root身份复制文件导致。用如下命令修改文件所有者

未知美女

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4