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.

Backup ->SQL DB Backup -> ERROR!

Discussion in 'Database Discussions' started by ZeroFill, Jun 14, 2003.

  1. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    When trying to backup any of my mySQL databases, I get the following error:
    (note: the error above was in the .gz file it creates)

    Does anyone else have this error?

    Cpanel Version/Build 6.4.2-STABLE Build 75
    PHP Version 4.3.1
    Mysql Version 4.0.12
     
  2. Chuckman

    Chuckman Member

    Joined:
    Aug 1, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I have this error. If we get it solved, I will let you know.

    Richard

    cPanel.net Support Ticket Number:
     
  3. claw

    claw Registered

    Joined:
    Jul 20, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Do you have any progress on this issue? I am willing to know how to fix that...

    cPanel.net Support Ticket Number:
     
  4. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    not i, still broken :(

    cPanel.net Support Ticket Number:
     
  5. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    has anyone gotten this to work yet?

    cPanel.net Support Ticket Number:
     
  6. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    cd /home
    cd username


    mysqldump -udbuser_name -p username_dbname > public_html/nameoffile.withext

    cPanel.net Support Ticket Number:
     
  7. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    for two of our daily backed-up database, we have a daily cron script which does

    Code:
    /usr/bin/mysqldump --opt -uUSER -pPASS user_db > /home/user/backups/$date.sql
    
    but get cron email errors containing

    Code:
    /usr/bin/mysqldump: Got error: 1044: Access denied for user: 'user_db@localhost' to database 'user_db' when using LOCK TABLES
    /usr/bin/mysqldump: Got error: 1044: Access denied for user: 'user_db2@localhost' to database 'user_db2' when using LOCK TABLES
    
    i'm still baffeled why we dont have total control (cannot lock tables) over OUR OWN databases.

    btw, is there a safer way to do daily db cron backups w/o having to have the password in the command line?
     
  8. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    The username you use to log into your control panel should have access to all of the databases you create. Simply create a my.cnf file within your home directory with the following contents:
    Code:
    [client]
    password=CONTROL-PANEL-PASSWORD
    
    [mysqlhotcopy]
    interactive-timeout
    You should then be able to use the mysqlhotcopy command to make quick locked-table copies of your databases.
    Code:
    mysqlhotcopy database-name /home/USERNAME/database-name-backup
     
  9. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Just a follow up to my post. Since ownership/permissions on databases are set the way they are on a cPanel system, you will either have to run the hotcopy command as root, mysql or alther either the ownership or permissions on the database you want to copy.

    cPanel.net Support Ticket Number:
     
  10. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    so that means i cannot do the hotcopy command since i only have a user account on cpanel.

    cPanel.net Support Ticket Number:
     
  11. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    You could ask your host to change the group ownership/permissions on your databases.

    cPanel.net Support Ticket Number:
     
  12. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    already tried. they dont wanna mess with the system since 99.99% of the other users are happy w/ the way it is.

    cPanel.net Support Ticket Number:
     
  13. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    That's lame. It would take 2 seconds to change the group ownership & permissions on your databases. Oh well.

    cPanel.net Support Ticket Number:
     
  14. ZeroFill

    ZeroFill Active Member

    Joined:
    May 4, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    yeah, that's what i was thinking too but what am i gonna do? don't get me wrong, these guys are the best i've been with since moving from an HSphere based host and the other flops i've had in the past.

    hopefully cPanel will make database grants fully controllable like in HSphere. all we had to do was select the database/user and check on/off which permissions a user had.

    cPanel.net Support Ticket Number:
     
  15. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sachse, TX
    I agree with cipher. All they had to do was do some nice permissions change which only takes 2 seconds. Apparently they don't care.

    They could have offered to temporarily do it for you once in a while or on a set day.

    I guess they won't.

    If you need Cpanel, and a *hint* that will help you, PM me. :)

    Brenden

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page