How to solve the problem of unknown variable & # 039 defaultsmurfile in mysql
This article focuses on "how to solve the unknown variable 'defaults-file problem in mysql". Interested friends may wish to take a look. The method introduced in this article is simple, fast and practical. Let the editor take you to learn "how to solve the unknown variable' defaults-file problem in mysql"!
When initializing percona server 5.7,
Be sure to disable the default / etc/my.cnf mv or always give priority to reading the parameters according to the default configuration.
The error is as follows:
[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
Solution: just adjust the order of the parameters
[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
At this point, I believe you have a deeper understanding of "how to solve the unknown variable 'defaults-file problem in mysql", might as well come to the actual operation! here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!