What is the best way to downgrade to MYSQL 5.6 from 8.0

Operating system: Ubuntu
OS version: 20.04

Hi guys,

for some reason I need to install Mysql 5.6. How to do it better?

PS Honestly speaking I’ve installed it already but I am not sure i’ve done it correct way because I lost some functionality in webadmin - like MySQL System Variable s - i see only this string on that page /usr/local/mysql/libexec/mysqld
same like Host permission
I get
SQL select * from host order by host failed : Table 'mysql.host' doesn't exist

Others look working ok but i am still worry…


Hi @Aido21,

Did you read this first?

So what is the specific reason that makes you think you need to downgrade your mysql version?

Thank you for your reply.
The specific reason was in the old unsupported Laravel application. But the issue is resolved already and I am happy with 8.0 now :slight_smile:

I have the same issue, I saw this and was wondering if I can downgrade MySQL. I have a database from 5.7 and want to use it. The application is old and having issues on 8 right now. I came across this guide How can I properly downgrade from MySQL 8 to 5.7 on Ubuntu 20.04 | DigitalOcean and wondering if this would work fine with virtualmin.

Can I recommend y’all not do this?

If you want an old MySQL version, start with an old version. Downgrading a database that has been upgraded to 8.0 seems risky and complicated, and for no good reason.

1 Like

Ok but is it possible to have a separate mysql 5.6 for only one virtual server?
MySQL supports Multiple Instances but how to realise it with Virtualmin?

And the second question you said

start with an old version’

I already asked this question but have not got any clear answer. The Virtualmin installation script installs the last mysql version only. So what is the solution to start with an old version’ ?

PS I return to this topic because even I resolved my first issue I met with some new and using the old database is again one of the possible solution.

No, at least not managed by Virtualmin. You could manually create the database user and permissions and point your apps to another version though. Same as if you were using some other unsupported database (e.g. mongo or whatever) with your apps. Webmin can support multiple MySQL installs using the module clone feature, so you can still manage it in a UI, but it’s not going to be something Virtualmin will be aware of…you’ll need to handle backups.

This is just such an unusual request (and a bad idea). It’s never come up.

CentOS has SCL versions of MySQL and MariaDB that can coexist with the standard package (because it installs into /opt, and can be configured separately with a little tweaking), but I don’t know about Ubuntu. This path is probably harder than just fixing the application to not use rely on old behavior. There are not a huge number of compatibility changes from 5.6 to 8.0, at least not in areas your apps care about (user management changed a lot, which caused us a lot of pain, but apps don’t care about how users are created and passwords are set or changed).

Install on an OS that has a version that suits your needs. Or, install the database before installing Virtualmin (but it needs to match the standard install paths, or it’ll prevent installation from working well). Much smarter just to use an OS that has the versions of stuff you need. It has other negatives, but if you need old software, just start with old software.

Look, You have 2 users with such a request even here… So it is not so unusual as you think.
And also this case with the use of two (old and new) versions of MySql is directly mentioned in the MySQL documentation. So maybe the Virtualmin possibility to be more flexible with the servers setting in terms of different package versions for different virtual servers could be a good feature for your product.

From the other side I agree with you - it is better to use the last version of almost everything. And I do my best to do it but a bit tired already. For example - one remote java application uses old version of MySql. I cannot do anything with it. I had the local database set up to sync to a remote server. And now I have a lot of problems, since the previously working scheme does not work as it should, due to the version difference for example due to mismatch of data types (INT (xx) -> INT) etc. etc. etc.
So really sometimes I think that using the old version is the best solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.