1.查看当前默认的配置文件位置
# mysqld --verbose --help |grep -A 1 'Default options' Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
2.创建表报‘MySQL : ERROR 1215 (HY000): Cannot add foreign key constraint’错误
set foreign_key_checks=0;