I recently encountered a couple of frustrating MySQL database export errors and wanted to share the solutions I used with other folks, as well as document it for future me. Here’s my setup. These issues could appear on any platform, though. The first error I ran into when trying to export a DB was: TL;DR: Make sure that the version of My Local setup was configured
to use MariaDB v10.4.10. When setting the site up in MySQL Workbench (my preferred MySQL client), I was presented with the following warning when testing the connection: I made a mental note of the warning, but decided to proceed anyway. I didn’t have any problems running queries, so I didn’t think about it again. To export a DB using MySQL Workbench, connect to a DB server, then navigate to Server > Data Export. When attempting the export, a dialogue showing the following warning indicating a version mismatch was displayed: The export was not successful. Here’s the full log of the error:
Issue 1, Solution 1I did some Googling, and found this helpful post on ServerFault that explained a workaround for Windows/Mac/Linux. The solution is to create a script that runs Windows
Mac/Linux
This allowed me to successfully create a an export of the DB, but the dialogue indicating a MySQL version mismatch was still displayed: Issue 1, Solution 2I followed the dialogue’s guidance
and configured MySQL Workbench’s settings to point to the version of Edit > Preferences > Administration > Path to mysqldump Tool:
I then tried to export the DB again, and finally it worked without any errors and without needing to pass additional parameters to the client:
Issue 2: MySQL export fails due to user not having PROCESS privilegesThe second error I encountered was when I tried to make a backup of a remote database. In this case, I was not using the root user. The error was:
The error would also happen when connecting via the WP CLI:
When searching for a solution for this error, I found this comprehensive answer on the DBA StackExchange site, which explains that the issue crops up due to a security-related breaking change added to MySQL minor updates in v5.7.31 and v8.2.21. This issue does not affect the root user because it has inherently has all privileges. To resolve the problem, log into the the MySQL server and grant the
After the above commands were run on the server, I could once again make backups, and I was out of this rabbit hole. Don’t get stuck in your own rabbit hole. Use my recommended solutions, or contact our team to help dig you out of any holes or trenches where you’re currently trapped. |