Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Can't open and lock privilege tables: Table & # 039 witch mysql.username contacts 039; doesn't exist

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

[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

Check the error report:

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

Solution:

# View the current my.cnf configuration file

[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

# because the path specified when compiling and installing is / prosync/mysql/mysql/,mysql_install_db, the datadir specified is / prosync/mysql/mysql/data, and my.cnf is the default path

# so after modifying the datadir to the correct path, the problem is solved

[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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report