After upgrading ubuntu to 22.04 from 18.04 (was planning on upgrading to 20.04 but somehow I ended up with 22.04) I'm not able to start mysql server. The error is as follows:
[ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'
Ive tried adding this to /etc/mysql/.my.cnf to set the sql_mode, but doesn't seem to make a difference.
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
Also when running mysqld --verbose --help
the option sql_mode is empty.
Downgrading Ubuntu is difficult from what I found on Google wihtout a backup or reinstalling everything. And downgrading mysql is an option, but the backup I have is pretty old, so would prefer to fix it, or just get the existing data somehow...
Can anyone point me in the right direction? Thanks.