unknown variable 'defaults-file=/home/mysql/my3310.cnf'--percona server 5.7

mhabbyo發表於2016-11-21
初始化 percona server  5.7 的時候  

一定要把預設的 /etc/my.cnf  mv 掉 否則一直優先按照預設配置進行引數讀取


報錯如下:

[root@fund-mgmt-db-mog-2 ~]# /home/mysql/mysql/bin/mysqld --initialize --user=mysql --defaults-file=/home/mysql/my3310.cnf --basedir=/home/mysql/mysql  --datadir=/home/mysql/my3310/data
2016-11-21T02:44:43.017602Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-21T02:44:43.179291Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-11-21T02:44:43.214156Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-11-21T02:44:43.267368Z 0 [ERROR] unknown variable 'defaults-file=/home/mysql/my3310.cnf'
2016-11-21T02:44:43.267390Z 0 [ERROR] Aborting



解決辦法: 調整一下引數順序就好了


[root@fund-mgmt-db-mog-2 ~]# /home/mysql/mysql/bin/mysqld --defaults-file=/home/mysql/my3310.cnf --initialize --user=mysql --basedir=/home/mysql/mysql  --datadir=/home/mysql/my3310/data 





來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29291882/viewspace-2128790/,如需轉載,請註明出處,否則將追究法律責任。

相關文章