mysqldump Error 1045 Access denied despite correct passwords etc

后端 未结 28 1828
执笔经年
执笔经年 2021-01-30 12:56

This is a tricky one, I have the following output:

mysqldump: Got error: 1045: Access denied for user \'root\'@\'localhost\' (using password: YES) when tr

28条回答
  •  梦谈多话
    2021-01-30 13:24

    Access dined problem solved when I run command prompt in Administrator mode.

    Go to Start-> All Programs -> Accessories right click on Command Prompt clickc on Run as.. Select The Following User select administrator username from select option enter password if any click OK button.

    Example 1: For entire database backup in mysql using command prompt.

    In Windows 7 and 8

    C:\Program Files >\MySQL\MySQL Server 5.5\bin>mysqldump test -u root -p >testDB.sql
    Enter Password: *********
    

    In Windows xp

    C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqldump test -u root -p >testDB.sql
    Enter Password: *********
    

    It asks password for credentials enter password and click on Enter button.

    Example 2: For specific table backup / dump in mysql using command prompt.

    In Windows 7 and 8

    C:\Program Files >\MySQL\MySQL Server 5.5\bin>mysqldump test -u root -p images>testDB_Images.sql
    Enter Password: *********
    

    In Windows xp

    C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqldump test -u root -p images>testDB_Images.sql
    Enter Password: *********
    

    Dumpt file will be created under folder

    In windows xp

    C:\Program Files\MySQL\MySQL Server 5.5\bin
    

    In windows 7 and 8

    C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin

    Note: Check MySQL installation folder in Windows 7, 8 while run in command prompt. If MySQLWorkbench is 32 bit version it is installed in Program Files (x86) folder other wise Program Files folder.

提交回复
热议问题