Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


MySql Dump Error
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

MySql Dump Error

zong11zong11 Member

When i put cmd 'mysqldump database_name > database_name.sql' it shows error

mysqldump: Got error: 1044: Access denied for user 'db_username'@'localhost' to database 'mydbpasswrd' when selecting the database

Comments

  • AlexanderMAlexanderM Member, Top Host, Host Rep

    Means the 'db_username' dosen't have the permissions to access 'database'

  • raindog308raindog308 Administrator, Veteran

    image

  • desperanddesperand Member
    edited March 2016

    @zong11 said:
    When i put cmd 'mysqldump database_name > database_name.sql' it shows error

    mysqldump: Got error: 1044: Access denied for user 'db_username'@'localhost' to database 'mydbpasswrd' when selecting the database

    because you forget tell to 'mysqldump' some extra parameters about user and his password (which have permissions to do something with db).

    syntax is next:

     mysqldump -u user -ppassword db_name > output_db.sql
     Or better, type 'man mysqldump'
    
  • @desperand I m having username of mysql = abc_cde and password for that is 1234567
    and i m using command mysqldump -u abc_cde -p1234567 abc_cde > abcde.sql

    Even though i m getting same error. Plz tell me whre i am going wrong. And one more question we are not giving any path for sql export so where it will be exported???

  • edanedan Member
    edited March 2016

    How about this.

    
    mysqldump --user=$user --password=$pass mydb | gzip -9 > mydb.sql.gz
    
  • @desperand @edan @AlexanderM

    want to first go to mysql prompt... when i put following cmd it shows error

    [root@$$$ /]# mysql -u root -p
    Enter password: (I have entered here root password)

    Reply

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Tell me how to come out of this??

  • n0myn0my Member

    Ubuntu?

  • zong11zong11 Member
    edited March 2016

    @n0my cent os

  • Are you sure you're using your mysql root pass and not just your root (linux user) password?

  • @teamacc i have resetted password of mysql and now want to export from old and import to new... is there any perfect tutorial for that ... cent os

Sign In or Register to comment.