MySQL Workbench: Cannot export a database

Dimitra Micha picture Dimitra Micha · Jun 4, 2013 · Viewed 43.6k times · Source

I am encountering a problem concerning the export of a database. First of all, I have to clarify that I am using MySQL Workbench 5.2.47. The procedure that I followed so far is the following:

  1. I followed the instructions of http://mysqlworkbench.org/2012/07/migrating-from-ms-sql-server-to-mysql-using-workbench-migration-wizard/ in order to create a connection with my MSSQL DB in order to transform it into MySQL DB.

  2. Then I also checked that my data is imported in the database.

  3. Now I want to export it into an sql file / or preferably to frm,myi,myd files in order to place them in my server.

I have tried to export them from

  • Server Administration -> Data Export

  • Changed already the password from the security (Users and Privileges)

but I encounter the problem

Dumping test (all tables)
Running: mysqldump.exe --defaults-extra-file="c:\users\d_micha\appdata\local\temp\tmpgtwa_m.cnf"  --user=root --max_allowed_packet=1G --host=localhost --port=3306 --default-character-set=utf8 --single-transaction=TRUE --routines --events --no-data "test"

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect

Operation failed with exitcode 2

I don't know what I might be doing wrong and I have searched in google to find the solution, but it should be normally exported.

Any other information will be given upon request.

Thank you.

Answer

ewhitmire picture ewhitmire · Mar 23, 2015

I've seen this issue when you don't have the LOCK TABLES permission. You'll see this error before the rest of the access denied errors in the log. Try disabling LOCK TABLES in advanced settings in the Data Export panel of the workbench.

mysqldump: Got error: 1044: Access denied for user 'XXX'@'%' to database 'XXX' when doing LOCK TABLES