系统提示:
131217 11:07:09 mysqld_safe Starting mysqld daemon with databases from /data/mysql
131217 11:07:09 [Note] Plugin 'FEDERATED' is disabled.
/data/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
131217 11:07:09 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131217 11:07:09 InnoDB: The InnoDB memory heap is disabled
131217 11:07:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131217 11:07:09 InnoDB: Compressed tables use zlib 1.2.3
131217 11:07:09 InnoDB: Initializing buffer pool, size = 2.0G
131217 11:07:10 InnoDB: Completed initialization of buffer pool
131217 11:07:10 InnoDB: highest supported file format is Barracuda.
131217 11:07:10 InnoDB: Waiting for the background threads to start
131217 11:07:11 InnoDB: 1.1.8 started; log sequence number 1595675
131217 11:07:11 [Note] Recovering after a crash using mysql-bin
131217 11:07:11 [Note] Starting crash recovery...
131217 11:07:11 [Note] Crash recovery finished.
131217 11:07:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131217 11:07:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
131217 11:07:11 [Note] Server socket created on IP: '0.0.0.0'.
131217 11:07:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
131217 11:07:11 mysqld_safe mysqld from pid file /data/mysql/tsaweb1.pid ended
131217 11:07:19 mysqld_safe Starting mysqld daemon with databases from /data/mysql
131217 11:07:19 [Note] Plugin 'FEDERATED' is disabled.
/data/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
131217 11:07:19 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131217 11:07:19 InnoDB: The InnoDB memory heap is disabled
131217 11:07:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131217 11:07:19 InnoDB: Compressed tables use zlib 1.2.3
131217 11:07:19 InnoDB: Initializing buffer pool, size = 2.0G
131217 11:07:20 InnoDB: Completed initialization of buffer pool
131217 11:07:20 InnoDB: highest supported file format is Barracuda.
131217 11:07:20 InnoDB: Waiting for the background threads to start
131217 11:07:21 InnoDB: 1.1.8 started; log sequence number 1595675
131217 11:07:21 [Note] Recovering after a crash using mysql-bin
131217 11:07:21 [Note] Starting crash recovery...
131217 11:07:21 [Note] Crash recovery finished.
131217 11:07:21 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131217 11:07:21 [Note] - '0.0.0.0' resolves to '0.0.0.0';
131217 11:07:21 [Note] Server socket created on IP: '0.0.0.0'.
131217 11:07:21 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
131217 11:07:21 mysqld_safe mysqld from pid file /data/mysql/tsaweb1.pid ended
我谷歌了一下,说是初始化失败,但是我已经初始化了,命令是:
./mysql_install_db --basedir=/data/mysql --datadir=/data/mysql/data --user=mysql
附图:
一、确认一下启动的datadir参数对不对:
1.看一下mysql_safe进程的datadir的命令行参数;
2.看一下/etc/my.cnf文件的datadir配置
二、确认用户是否有数据库目录的权限
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。