今天准备新启一个MySQL实例,结果竟然无法初始化,内容如下:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[root@hadoop-node-2 ~]# cat /etc/issue
CentOS release 6.4 (Final)
[root@hadoop-node-2 ~]# mysql --version
./bin/mysql Ver 14.14 Distrib 5.6.24, for linux-glibc2.5 (x86_64) using EditLine wrapper
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
报错如下:
[root@hadoop-node-2 mysql56]# ./scripts/mysql_install_db --defaults-file=/data/db/mysql/3310/my.cnf
Installing MySQL system tables...2016-04-28 11:07:37 0 [Warning] Ignoring user change to 'root' because the user was set to 'mysql' earlier on the command line
2016-04-28 11:07:37 0 [Warning] Using unique option prefix host instead of host_cache_size is deprecated and will be removed in a future release. Please use the full name instead.
Unknown suffix '.' used for variable 'host_cache_size' (value '127.0.0.1')
2016-04-28 11:07:37 0 [ERROR] ./bin/mysqld: Error while setting value '127.0.0.1' to 'host_cache_size'
2016-04-28 11:07:37 0 [ERROR] Aborting
换种方法初始化,继续报错:
[root@hadoop-node-2 mysql56]# ./scripts/mysql_install_db --no-defaults --datadir=/data/db/mysql/3310