By akuppa
I upgraded from Ubuntu 18 to Ubuntu 20. mySQL upgrade failed during the upgrade.
After the upgrade, I again tried to install mysql-server. I’m getting the below error:
Error while setting value 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
Command used:
sudo apt install mysql-server
I used the above command after upgrade to Ubuntu20.
I even tried to edit the configuration, but that didn’t help.
[mysqld]
sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
Added the above two lines in /etc/mysql/mysql.cnf.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
It looks like that the sql_mode value might already be specified in some of your configuration files already.
I could suggest using the grep command to search for any references of sql_mode and update them accordingly:
grep -ri "sql_mode" /etc/mysql/*
The values are mostlikely specified in the `/etc/mysql/mysql.conf.d/mysqld.cnf file.
I was able to replicate the problem on Ubuntu 20.x with the sql_mode values from the error.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.