wdcp更新後的mysql怎麼也啟動不了,網上找了很多方法都不可行~
:: mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql/var
/www/wdlinux/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
:: [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
:: InnoDB: The InnoDB memory heap is disabled
:: InnoDB: Mutexes and rw_locks use GCC atomic builtins
:: InnoDB: Compressed tables use zlib
:: InnoDB: Initializing buffer pool, size = M
:: InnoDB: Completed initialization of buffer pool
:: InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn
:: InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number
:: InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents:
InnoDB: Apply batch completed
:: InnoDB: Waiting for the background threads to start
:: InnoDB: started; log sequence number
:: [Note] Server hostname (bind-address): ''; port:
:: [Note] - '' resolves to '';
:: [Note] Server socket created on IP: ''.
:: [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
:: mysqld_safe mysqld from pid file /www/wdlinux/mysql/var/Dell.pid ended
新版本缺少一些必要的檔案,網上說要執行mysql_install_db指令,但大部分mysql_install_db 執行不對,正确的方式如下,不能少了–basedir:
[email protected]:/www/wdlinux/mysql-/scripts$ sudo /www/wdlinux/mysql/scripts/mysql_install_db --user=mysql --basedir=/www/wdlinux/mysql --datadir=/www/wdlinux/mysql/var
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:
/www/wdlinux/mysql/bin/mysqladmin -u root password 'new-password'
/www/wdlinux/mysql/bin/mysqladmin -u root -h Dell password 'new-password'
Alternatively you can run:
/www/wdlinux/mysql/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 /www/wdlinux/mysql ; /www/wdlinux/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /www/wdlinux/mysql/mysql-test ; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
這個時候,我們還沒有設定ROOT使用者登入密碼
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
切忌,先啟動服務,然後設定密碼,不然會提示沒有操作權限~
wangxiong@Dell:~$ sudo service mysqld start
[sudo] password for wangxiong:
Starting MySQL.. *
wangxiong@Dell:~$ /www/wdlinux/mysql/bin/mysql_secure_installation
根據提示設定ROOT使用者密碼,好了後面修改密碼可以去WDCP面闆上操作了