Guys, I changed DB to Mariadb and uploaded backed up data bases, and now I’m trying to update users and I get this error:
SQL select * from user where user = '' failed : View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Does anyone know how to fix this issue, please?. Thanks
|—|—|
|||
|OS type and version:|UBUNTU 20.04|
|Webmin version:|REQUIRED|
|Virtualmin version:|REQUIRED|
|Related products version:|RECOMMENDED|
Failed to create database : SQL select distinct host from user where user = ? failed : View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Based on your OS version, I am assuming you were using MySQL v8.0.xx
Unfortunately, the migration from MySQL v8.0+ to MariaDB isn’t as straightforward anymore and you have to use the mysqldump utility to move the database over.
This is clearly stated in the official MariaDB Docs which also has some pointers on how to migrate from MySQL v8.0+ to MariaDB.
I would recommend moving your backup to a test server or spare server that uses MySQL, make sure the backup works fine and then go ahead with migrating the database, but this time, using mysqldump as shown in the MariaDB Docs.
No, there aren’t any built-in Virtualmin feature for migrating MySQL to MariaDB (AFAIK).
I do understand that there is a slight increase in performance with MariaDB but I would personally recommend sticking with the database shipped with your OS though (here, MySQL v8.0.xx) unless you are good at and willing to debug weird compatibility issues later down the road.
I am trying to back db in VM and I keep getting this error: Backup failed : Backup failed - try again to a file on the server to see the full error message…
Never mind. I was able to make it go, however, I’m faced with the same exact issue.
backup of mysql failed : mysql::execute_sql failed : SQL select distinct host from user where user = ? failed : View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
What are some of these issues that you see in MySQL and not in MariaDB?
Other than the slight performance difference, the latest MySQL v8.0+ is quite efficient as well if tweaked correctly (just as you have to tweak MariaDB to make it efficient).
If you are concerned with the slight performance difference, pair your MySQL database with a memory cache system like MemCached or Redis and you should see positive results with regards to database performance.
P.S. You can DM if you would like me to configure this on your server(s) for you.
My issue was creating this new server using Ubuntu and coming off Centos 7. We uploaded the back up database onto 8 and nothing worked correctly. We replaced it with Mariadb and it started working correctly until I tried creating a new user, and this is where we’re stuck now. I have a backed up copy of the complete dump. Can I delete all DB from Phpmyadmin and re-upload using mysqldump? Db’s are not my thing…
That seems extremely unlikely. I think you’re just making your life harder here, and I don’t recommend doing it (it seems you’re already committed to the project, but hopefully others reading this thread can be dissuaded from doing drastic things for no good reason).
It seems the only way to make all this happen is by creating all websites new from scratch without moving any databases… This project has been a total nightmare. How would you go about this?..