网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Can'topenandlockprivilegetables:Table'mysql.user'doesn'texist

[root@szq scripts]# service MySQLd start
Starting MySQL..The server quit without updating PID file(/var/lib/mysql/szq.pid).[FAILED]

# more  /prosync/mysql/mysql/data/szq.err 
查看报错:
160413 04:46:40 mysqld_safe Starting mysqld daemon with databases from /prosync/mysql/mysql/data
2016-04-13 04:46:40 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-13 04:46:40 0 [Note] /prosync/mysql/mysql/bin/mysqld (mysqld 5.6.30) starting as process 29379 ...
2016-04-13 04:46:40 29379 [Note] Plugin 'FEDERATED' is disabled.
/prosync/mysql/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2016-04-13 04:46:40 29379 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-04-13 04:46:40 29379 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-04-13 04:46:40 29379 [Note] InnoDB: The InnoDB memory heap is disabled
......
2016-04-13 04:46:41 29379 [Note]   - '::' resolves to '::';
2016-04-13 04:46:41 29379 [Note] Server socket created on IP: '::'.
2016-04-13 04:46:41 29379 [ERROR]Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
160413 04:46:41 mysqld_safe mysqld from pid file /prosync/mysql/mysql/data/szq.pid ended
160413 04:49:43 mysqld_safe Starting mysqld daemon with databases from /prosync/mysql/mysql/data
......
/prosync/mysql/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2016-04-13 04:49:43 29528 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-04-13 04:49:43 29528 [Note] InnoDB: Using atomics to ref count buffer pool pages
......
2016-04-13 04:49:43 29528 [Note] Server socket created on IP: '::'.
2016-04-13 04:49:43 29528 [ERROR]Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
160413 04:49:43 mysqld_safe mysqld from pid file /prosync/mysql/mysql/data/szq.pid ended

解决办法:
#查看当前的my.cnf配置文件
[root@szq scripts]# more /etc/my.cnf |grep -v ^#

[mysqld]
basedir =/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
old_passwords=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

#由于编译安装时指定的路径为/prosync/mysql/mysql/,mysql_install_db时指定的datadir为/prosync/mysql/mysql/data,而my.cnf为缺省的路径
#因此修改datadir至正确路径后,问题解决
[root@szq scripts]# vi /etc/my.cnf
[root@szq support-files]# more /etc/my.cnf |grep datadir
basedir = /prosync/mysql/mysql
datadir = /prosync/mysql/data

[root@szq kdb11]# service mysql start 
Warning: World-writable config file '/prosync/mysql/mysql/my.cnf' is ignored
Starting MySQL. SUCCESS! 

网页标题:Can'topenandlockprivilegetables:Table'mysql.user'doesn'texist
网页链接:http://bjjierui.cn/article/ipcjho.html

其他资讯