carlarogers
Member
The information on how sql_mode is supposed to be set does not seem to conform to what my system does.
OBJECTIVE: Permanently set sql_mode sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
APPROACH: Put the following statement into one of the config files for Mariadb, that is read after any other config file with a declaration for sql_mode.
DETERMINING WHICH CONFIG FILE TO USE:
Obviously, i am missing something, but I am stumped at the moment. If you can help, I would appreciate it a lot. Thank you.
OBJECTIVE: Permanently set sql_mode sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
APPROACH: Put the following statement into one of the config files for Mariadb, that is read after any other config file with a declaration for sql_mode.
Code:
sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
DETERMINING WHICH CONFIG FILE TO USE:
- Get a list of config files read, by first, finding the binary for mariadb....
Code:which mariadb
Run this command, using the result from above:
Code:/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
- Those files are linked to files. I traced them all and found no statements in any of them for setting sql_mode.
- The file I picked /etc/my.cnf. In that file, I entered
-
Code:
[mysqld] sql_mode = "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
- Restarted mysql.
- Checked sql_mode using this at command line
Code:mysql -u admin -p`cat /root/.nothing/lostssh` -e "select @@sql_mode"
Code:+------------------------------------------------------------------------------------------------------------------------------------------------------+| @@sql_mode | +------------------------------------------------------------------------------------------------------------------------------------------------------+ | STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +------------------------------------------------------------------------------------------------------------------------------------------------------+
Obviously, i am missing something, but I am stumped at the moment. If you can help, I would appreciate it a lot. Thank you.