mysqldump Access is denied error on Vista

Windows Vista MySQL Access DeniedToday, I was trying to make a copy a MySQL database that resides in my laptop with Windows Vista. I ran the mysql dump command but I got an error: “Access is denied”.

The mysqldump command is simple. I never forgot it’s basic syntax.

mysqldump -u username -p dbname > dbbackup.sql

The reason why I never did is because the first time I tried it on a Windows XP machine, I logged in to MySQL prompt and tried to run the mysqldump command. It took me a couple hours to find out that I didn’t need to login to MySQL before running the command. I was just supposed to go to the MySQL bin directory and run the executable command.

Anyways, I suppose you are not making the same mistake because you are already getting the frustrating “Access is denied” error. Why?

Well, one of the differences between XP and Windows Vista you may have noticed first is that Vista keeps on asking for your permission when you try to do certain tasks. “Windows needs your permission to continue”.

Seems that Vista doesn’t let you create new files using the Command Prompt. So it’s a Windows error rather than a MySQL error.

Windows Vista Run as administrator Command Prompt

So here is what you do: specify you are an Administrator for Vista by right-clicking the Command Prompt icon and select “Run as administrator” from the menu. That’s it. Navigate to the MySQL bin directory, run the mysqldump command and it should work.

Leave a Reply