Can i export mysqls when i dont want to use mysql password?


when i want to get a mysql database backups and i dont want to login into mysqldump or dont want to reset password, can i anyhow make them? I have access to the mysql data files.

You have different methods to back up your database but you will have to use the username and password of an account authorized to do what you want to do whatever task you want to do (in this case, doing your database backup). It doesn’t have to be the root or admin account. Just an account authorized to do so in the database you want to use.

If you use a graphic interface to do this, like MySQL Workbench, you may have to only use it once… because this type of interfaces have their own vault to save passwords. But you still need the password.

Not sure what you mean with reseting the password. You would only need to reset it if you forgot it.


Try to add a file in your home directory and it will disable the mysqldump password prompting. This is done by creating the file ~/.my.cnf (permissions need to be 600).

Add this to the .my.cnf file


This lets you connect as a MySQL user who requires a password without having to actually enter the password. You don’t even need the -p or --password.

Alternatively can try the following command:

mysqldump –u[user name] –p[password] [database name] > [dump file]

The steps to achieve this can also be found in this link

Hope this helps.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.