
Connection Commands ~CAT5IN - Transfers a. Conventions Used in This Reference 1.1.1. Use my recommended solutions, or contact our team to help dig you out of any holes or trenches where you’re currently trapped.Table of Contents 1. GRANT PROCESS ON *.* TO Īfter the above commands were run on the server, I could once again make backups, and I was out of this rabbit hole.ĭon’t get stuck in your own rabbit hole. To resolve the problem, log into the the MySQL server and grant the PROCESS privilege to the affected user: This issue does not affect the root user because it has inherently has all privileges. 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. The error would also happen when connecting via the WP CLI: Mysqldump: Error: 'Access denied you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces In this case, I was not using the root user. The second error I encountered was when I tried to make a backup of a remote database. Running: "C:\Program Files (x86)\Local\resources\extraResources\lightning-services\mariadb-10.4.10+4\bin\win32\bin\mysqldump.exe" -defaults-file="c:\users\user1\appdata\local\temp\tmp_mjmqv.cnf" -user=root -host=127.0.0.1 -protocol=tcp -port=10142 -default-character-set=utf8 -skip-triggers "local"ġ1:59:55 Export of D:\dev\local-sites\mysqlexporttestmariadb\mysqlexporttestmariadb-.sql has finished Issue 2: MySQL export fails due to user not having PROCESS privileges

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: I followed the dialogue’s guidance and configured MySQL Workbench’s settings to point to the version of mysqldump provided with the MariaDB version used by Local.Įdit > Preferences > Administration > Path to mysqldump Tool:Ĭ:\Program Files (x86)\Local\resources\extraResources\lightning-services\mariadb-10.4.10+4\bin\win32\bin\mysqldump.exe This allowed me to successfully create a an export of the DB, but the dialogue indicating a MySQL version mismatch was still displayed: "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysqldump.exe" %* -column-statistics=0 Mac/Linux The solution is to create a script that runs mysqldump with the flag -column-statistics=0, then configure Workbench to point to the script: OFF I did some Googling, and found this helpful post on ServerFault that explained a workaround for Windows/Mac/Linux. Mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'local' AND TABLE_NAME = 'wp_commentmeta' ': Unknown table 'column_statistics' in information_schema (1109)ġ1:52:38 Export of D:\dev\local-sites\mysqlexporttestmariadb\mysqlexporttestmariadb-.sql has finished with 1 errors Issue 1, Solution 1 Running: mysqldump.exe -defaults-file="c:\users\user1\appdata\local\temp\tmpnkltww.cnf" -user=root -host=127.0.0.1 -protocol=tcp -port=10142 -default-character-set=utf8 -skip-triggers "local" When attempting the export, a dialogue showing the following warning indicating a version mismatch was displayed: To export a DB using MySQL Workbench, connect to a DB server, then navigate to Server > Data Export. I didn’t have any problems running queries, so I didn’t think about it again. I made a mental note of the warning, but decided to proceed anyway. When setting the site up in MySQL Workbench (my preferred MySQL client), I was presented with the following warning when testing the connection: My Local setup was configured to use MariaDB v10.4.10. (You know, like the warning message suggests when you try and do otherwise.) Use MySQL v5.7 or v8 when setting up a site in Local by Flywheel rather than using Maria DB. TL DR: Make sure that the version of mysqldump that your MySQL client (MySQL Workbench in my case) points to is the same as the DB version as what is used by the server. Unknown table 'column_statistics' in information_schema (1109)

The first error I ran into when trying to export a DB was: Issue 1: MySQL database export error due to client/server version mismatch

Database client: MySQL Workbench v8.0.22.These issues could appear on any platform, though. 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.
