Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench: Cannot export a database

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.

like image 924
Dimitra Micha Avatar asked Jun 04 '13 12:06

Dimitra Micha


People also ask

How do I export a workbench record?

To export data from Workbench, you need to opt for Bulk CSV in the “View As” options and run your query. Once it has run, you can download the query results by clicking on the download icon next to the Batch ID.

How do I import and export data from MySQL workbench?

To import a file, open Workbench and click on + next to the MySQL connections option. Fill in the fields with the connection information. Once connected to the database go to Data Import/Restore. Choose the option Import from Self-Contained File and select the file.


1 Answers

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
like image 74
ewhitmire Avatar answered Nov 16 '22 03:11

ewhitmire