mysql初始化了还是报错,怎么搞?

死神骑士 发布于 2013/12/17 11:10
阅读 487
收藏 0

系统提示:

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


而且在/data/mysql/data里面也有了相应的文件,但是启动还是不行。。。请问还应该修改什么参数。。谢谢!

附图:

加载中
0
喂码呢
喂码呢

一、确认一下启动的datadir参数对不对:

1.看一下mysql_safe进程的datadir的命令行参数;

2.看一下/etc/my.cnf文件的datadir配置

二、确认用户是否有数据库目录的权限

返回顶部
顶部