I recently had to back up a MySQL database on a windows server so I could restore it to my local MySQL server for analysing the structure of an existing site which we are going to be rebuilding. I have done this hundreds of times on linux server but the usual command did not appear to work on this windows server. I was using:-
mysqldump -uroot -pPASSWORD database > c:\database.sql
but when I ran this I was presented with an “Access Denied” message.
My first thought was that the MySQL database username and password that I was using was incorrect, however this message refers to not having permissions to create the file c:\database.sql.
Once I realised this was a file permissions problem and not a database permissions problem I changed the path to one I knew I had write access on and the database exported without any problems.