The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ERROR in "MysqlDump" Access denied?

Discussion in 'Database Discussions' started by SpiritualWorlds, Mar 4, 2016.

  1. SpiritualWorlds

    Joined:
    Mar 3, 2016
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    When i try to run simple bash DB backup command on my paid shared hosting via SSH i get this error

    Tried adding skiplock then it errors same with access denied flush privileges etc, i had also tried without "--single-transaction" and "--force --lock-all-tables"

    PHP:
    mysqldump --user=${USER} --password=${PASS} --single-transaction --quick --force --lock-all-tables --all-databases gzip --quiet "${backup_dir}/${backup_date}.sql.gzip"
     
  2. SpiritualWorlds

    Joined:
    Mar 3, 2016
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    I had also checked PhpMyAdmin privileges . No matter what switch i use or don't i get this error this
    i.imgur.com/7nYHXk4.png

    - Please Attach Images to Your Posts -
     
    #2 SpiritualWorlds, Mar 4, 2016
    Last edited by a moderator: Mar 5, 2016
  3. SpiritualWorlds

    Joined:
    Mar 3, 2016
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    I was able to reproduce the error, i found it. Whenever i use this switch "--all-databases" it will throw access denied. If i dont use this switch and specify hard-coded DB name then it works. Any solution for this? how to retrieve DB name onfly ?
     
  4. SpiritualWorlds

    Joined:
    Mar 3, 2016
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    I feel my host doesn't allow that and its very pathetic ..

    i tried
    $ echo "show databases;" | mysql
    $ echo "show databases;" | mysql -u [user with mysql access]
    $ echo "show databases;" | mysql -p -u [user with mysql access]

    But all shown privilege error, so tell me how in the world i find DB name so i can use that in mysqldump ??
    ERROR 1045 (28000): Access denied for user
     
  5. SpiritualWorlds

    Joined:
    Mar 3, 2016
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Yes, i opened a TICKET on my webhost and it clearly confirmed
    So, guys tell me some way to fetch the DB name?
     
  6. SpiritualWorlds

    Joined:
    Mar 3, 2016
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Still, looking for this.. So far i had tried 10+ method with absolute no success ..
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    It makes sense that "--all-databases" does not work with a shared hosting plan because I believe it's designed to dump all MySQL databases on the server. Could you elaborate on your specific need? For instance, are you attempting to download a backup of your database, or do you require additional data?

    Thank you.
     
Loading...

Share This Page