When trying to launch MySQL from the terminal using
mysql -u <username> -p<password> I get the following error:
mysql: [ERROR] unknown variable 'sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
Out of the possible three places that MySQL is looking for the .cnf file (found them by running
sudo /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"), only
/etc/mysql/my.cnf exist. In it there is only a directory including
!includedir /etc/mysql/conf.d/. There, in
/etc/mysql/conf.d/mysql.cnf there are the following lines:
Looked around for answers, couldn't find any. Tried, one by one, to rule out specific "bad mode" from the list of modes, they're all unrecognized.
Only by completely commenting out this line, I was able to login and launch MySQL.
Does anyone knows what the problem might be?
Platform and OS aspects:
- The MySQL version I am using is 5.7.17
- The operating system is Lubuntu version 16.04, 4.7.3-generic, x86_64