您的位置:首页 > 运维架构 > Linux

/www/wdlinux/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist

2016-08-01 12:35 537 查看
wdcp升级后的mysql怎么也启动不了,网上找了很多方法都不可行~

160801 12:11:25 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql/var
/www/wdlinux/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
160801 12:11:25 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160801 12:11:25 InnoDB: The InnoDB memory heap is disabled
160801 12:11:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160801 12:11:25 InnoDB: Compressed tables use zlib 1.2.8
160801 12:11:25 InnoDB: Initializing buffer pool, size = 128.0M
160801 12:11:25 InnoDB: Completed initialization of buffer pool
160801 12:11:25 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 49439
160801 12:11:25  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 1595675
160801 12:11:25  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
160801 12:11:25  InnoDB: Waiting for the background threads to start
160801 12:11:26 InnoDB: 5.5.36 started; log sequence number 1595675
160801 12:11:26 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160801 12:11:26 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160801 12:11:26 [Note] Server socket created on IP: '0.0.0.0'.
160801 12:11:26 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
160801 12:11:26 mysqld_safe mysqld from pid file /www/wdlinux/mysql/var/Dell.pid ended


新版本缺少一些必要的文件,网上说要执行mysql_install_db命令,但大部分mysql_install_db 执行不对,正确的方式如下,不能少了–basedir:

wangxiong@Dell:/www/wdlinux/mysql-5.5.36/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面板上操作了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: