Mysql報錯Fatal error:Can't open and lock privilege tables
Mysql報錯Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
安裝mysql後,啟動時候沒有啟動成功,檢視了下日誌報錯如下:---------------------------------------------
1 可以:初始化mysql:mysql_install_db
2 目錄許可權問題chown -R mysql:mysql /var/lib/mysql
[root@localhost local]# less /var/log/mysqld.log
1、檢視報錯資訊如下:
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
2、經過查閱資料得知。要敲如下命令解決:
mysql_install_db –usrer=mysql datadir=/var/lib/mysql
datadir是我的mysql存放檔案目錄
3、然後重啟mysql還是不行:
MySQL Daemon failed to start.
正在啟動 mysqld: [失敗]
4、然後試了下單獨的命令,啟動完成
mysql_install_db
5、啟動mysql服務
[root@mysql mysqld]# /etc/init.d/mysqld restart
停止 mysqld: [確定]
正在啟動 mysqld: [確定]
安裝mysql後,啟動時候沒有啟動成功,檢視了下日誌報錯如下:---------------------------------------------
1 可以:初始化mysql:mysql_install_db
2 目錄許可權問題chown -R mysql:mysql /var/lib/mysql
[root@localhost local]# less /var/log/mysqld.log
1、檢視報錯資訊如下:
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
2、經過查閱資料得知。要敲如下命令解決:
mysql_install_db –usrer=mysql datadir=/var/lib/mysql
datadir是我的mysql存放檔案目錄
3、然後重啟mysql還是不行:
MySQL Daemon failed to start.
正在啟動 mysqld: [失敗]
4、然後試了下單獨的命令,啟動完成
mysql_install_db
5、啟動mysql服務
[root@mysql mysqld]# /etc/init.d/mysqld restart
停止 mysqld: [確定]
正在啟動 mysqld: [確定]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1301666/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist解決辦法ErrorMySql
- [ERROR] Can't open the mysql.plugin tableErrorMySqlPlugin
- mysql can't connect error about privilege----not root userMySqlError
- MySQL報錯Table 'plugin' is read only [ERROR] Can't open the mysql.plugin table.MySqlPluginError
- MySQL 5.5 原始碼安裝報錯"[ERROR] Can't start server"MySql原始碼ErrorServer
- RMAN的"rman: can't open target"錯誤
- MySQL報錯'ERROR 2002 (HY000): Can't connect to local MySQL server through'MySqlErrorServer
- rman: can't open target
- Fatal error: can't check configuration file '/home/watt/proxy/dError
- mysql [ERROR] Can't create IP socket: Permission deniedMySqlError
- GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test';ASTErrorDatabase
- Linux下安裝Oracle 錯誤解決 - Error: Can't open display:127.0..0.1:0.0LinuxOracleError
- MySQL 建立外來鍵報錯Can't write; duplicate key in tableMySql
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- eslint --fix 報錯 can't not find modulesEsLint
- MongoDB報錯:"assertion" : "can't map file memory"MongoDB
- 【Mysql】FLUSH TABLES WITH READ LOCKMySql
- mysql表鎖與lock tablesMySql
- [ERROR] mysqld: Can‘t open shared library ‘/usr/local/mysql/lib/plugin/validate_password.so‘ (errno:ErrorMySqlPlugin
- mysql匯入報錯Variable 'sql_notes' can't be set to the value of 'NULL'MySqlNull
- MySQL 5.5 LOCK TABLES 和 UNLOCK TABLES 語句介紹MySql
- MySQL 5.5 關閉資料庫報錯"Can't connect to local MySQL server through socket"MySql資料庫Server
- MySQL 5.7向表匯入資料包錯"ERROR 13 (HY000): Can't get stat of"MySqlError
- Fatal NI connect error 12170.報錯處理Error
- 【MySql】MySQL Replication Fatal Error 1236MySqlError
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- mysql關於FLUSH TABLES和FLUSH TABLES WITH READ LOCK的理解MySql
- MySQL 5.5初始化資料庫報錯FATAL ERROR: Could not find my_print_defaultsMySql資料庫Error
- ERROR in Entry module not found Error Can't resolve 'babel' in ' UseErrorBabel
- MYSQL SOURCE報錯 ERROR: ASCIIMySqlErrorASCII
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- MySQL Replication Fatal Error 1236MySqlError
- mysql報CanMySql
- MySQL案例-不同尋常的[ERROR]Can't create a new thread (errno 11)MySqlErrorthread
- mysql [ERROR] InnoDB: ./ibdata1 can't be opened in read-write modeMySqlError
- 【MySQL】ERROR 1005 (HY000): Can't create table' (errno: 150)MySqlError
- cygwin在Win10下的問題 perl.exe: *** fatal error in forked process - fork: can't reserve memory for parentWin10Error
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer