1

What I've been trying to do is to send some data from MySQL to other computers.

I searched the internet for a solution and the best way is probably to put the data into a file, by using the export function.

Soon I encountered an error. Here is part of the log.

Running: "C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin\mysqldump.exe" 
--defaults-file="c:\users\takaha\appdata\local\temp\tmpx2hr0e.cnf"  
--enable-cleartext-plugin --user=root --host=localhost --protocol=tcp 
--port=3306 --default-character-set=utf8 --events --skip-triggers "db_student_comments"
mysqldump: unknown option '--enable-cleartext-plugin'

Operation failed with exitcode 2
14:44:03 Export of C:\Users\takaha\Documents\dumps\Dump20150212.sql has finished with 1 errors

Apparently, this error is similar to this error, but trying the first and second advice on this page didn't solve it, and I've spent more than two days in this problem so far.

I'll put a image of my cmd, since using cmd was recommended at other Stackoverflow pages. This image shows the dumping seems to have successfully been done, but I don't know where the file is. (The "dump" folder was automatically created in C:\Users\username\Documents, but this folder is empty.)enter image description here

I'd appreciate any advice.

EDIT

Thanks to Danyal, this was solved. All I had to do was to exactly indicate the directory to create the file after ">".

Community
  • 1
  • 1
Hiroki
  • 3,893
  • 13
  • 51
  • 90

2 Answers2

2

why don't you use this command?

 mysqldump -u'username' -p'password' database_name > back_up.sql

You need to have mysql in the environment variable. If it isn't there, you can go to mysql's bin directory and can execute this command.

Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78
  • Thank you for your advice. But after this command is executed, it says that the access was denied. – Hiroki Feb 12 '15 at 06:06
  • what username are you using? use root and password of root..probably the user you are using doesn't have the permissions – Danyal Sandeelo Feb 12 '15 at 06:32
  • The access issue was solved, but now cmd says that 'Using a password on the command line interface can be insecure'. – Hiroki Feb 12 '15 at 06:33
  • By the way, `back_up.sql` on you answer is a file name, which I can determine, is it correct? – Hiroki Feb 12 '15 at 06:39
  • YES... do it like mysqldump -uroot -p databasename > file.sql . ..it will then ask you to enter the password...entering the password is insecure history of commands can be seen which can reveal the password to others. – Danyal Sandeelo Feb 12 '15 at 06:40
  • you can save it in any directory the path can be d:/folder/file.sql ...you can create a test database and load back the file to verify it by command mysql -uroot -p database < file.sql ( sign < is used to load back). – Danyal Sandeelo Feb 12 '15 at 06:51
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/70831/discussion-between-ymd-and-danyal-sandeelo). – Hiroki Feb 13 '15 at 06:01
0

Per the docs:

The mysql, mysqladmin, and mysqlslap client programs support an --enable-cleartext-plugin option that enables the plugin on a per-invocation basis.

It does not appear to be a valid option for mysqldump. You shouldn't need it at all unless you're using non-standard MySQL authentication.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368