Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member feldon27's Avatar
    Join Date
    Mar 2003
    Location
    Houston, TX
    Posts
    39

    Default MySQLDump Broken

    Any time I run MySQLDump, no matter what parameters it puts, it gives me this bizarre error:

    Code:
    mysqldump: unknown option '--pico httpd.conf'

  2. #2
    Member feldon27's Avatar
    Join Date
    Mar 2003
    Location
    Houston, TX
    Posts
    39

    Default

    Not good!!

    mysql -u username -p dbname > file.sql
    doesn't work either!!!

    I do nightly MySQL backups and none of it has worked since CPAN changed/broke a few weeks ago!!!

  3. #3
    Member feldon27's Avatar
    Join Date
    Mar 2003
    Location
    Houston, TX
    Posts
    39

    Default

    Thank God for MySQLAdmin. That helps me backup my smaller DB but I also have a much bigger DB (400MB).

  4. #4
    Member feldon27's Avatar
    Join Date
    Mar 2003
    Location
    Houston, TX
    Posts
    39

    Default

    For some reason, the backup part of /etc/my.cnf changed from:

    Code:
    [mysqldump]
    quick
    max_allowed_packet = 16M
    to
    Code:
    [mysqldump]
    quick
    max_allowed_packet = 16M
    pico httpd.conf
    I guess there's always the possibility of fat-fingered typing.
    Last edited by feldon27; 01-18-2006 at 11:57 AM.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by feldon27
    mysqldump: unknown option '--pico httpd.conf'
    I suggest you check this page out for more information on how to "properly" use the command mysqldump:
    http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  6. #6
    Member feldon27's Avatar
    Join Date
    Mar 2003
    Location
    Houston, TX
    Posts
    39

    Default

    No matter what I did, any time I typed mysqldump, regardless of parameters including something straightforward as:

    mysqldump --opt -u feldon23 -p feldon23_dbname > backup.sql
    or
    mysql -u feldon23 -p feldon23_dbname > backup.sql

    it would spit out the --pico httpd.conf error.

    Anyway, it was all a case of operator error. I'm very familiar with mysqldump (when it's not screwed up by a bad config) and I have automated backup scripts that backup, gzip, and then delete the backup from 2 days ago every night:

    Code:
    fname=forumbackup-`eval date +%Y-%m-%d`.sql
    echo "Backing up forum..."
    mysqldump --opt -quick -u feldon23 -p ******** feldon23_forum > /home/feldon23/backups/$fname
    echo "Gzipping..."
    gzip /home/feldon23/backups/$fname
    a=`eval date +%d`
    a=`expr $a - 2`
    fname=forumbackup-`eval date +%Y-%m-`$a.sql.gz
    rm /home/feldon23/backups/$fname
    fname=forumbackup-`eval date +%Y-%m-`0$a.sql.gz
    rm /home/feldon23/backups/$fname
    Last edited by feldon27; 01-18-2006 at 12:18 PM.

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    OK!

    Before you backup your forum DB, run

    mysqlcheck -s -u root -p databasename

    To make sure that there's no corrupted tables. You may ignore HEAP tables like cp sessions and sessions table messages.

    Now, if there're corrupted tables, you can repair'em with the following command:

    mysqlcheck -q -r -u root -p DB_NAME
    then rerun
    mysqlcheck -s -u root -p DB_NAME

    When done, try this command and see what's gonna happen:
    mysqldump --quick --add-drop-table --add-locks --extended-insert --lock-tables --opt -uroot -pPASSWORD_HERE NAME_OF_DB > db-sqldump.sql

    If you wish to restore
    mysql -uroot -pPASSWORD_HERE NAME_OF_DB < db-sqldump.sql
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge trparky's Avatar
    Join Date
    Apr 2003
    Posts
    190

    Default

    Try removing that "pico httpd.conf" line from your /etc/my.cnf and then try.

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by feldon27
    For some reason, the backup part of /etc/my.cnf changed from:

    Code:
    [mysqldump]
    quick
    max_allowed_packet = 16M
    pico httpd.conf
    I guess there's always the possibility of fat-fingered typing.
    Very good point trparky I thought feldon27 said that was a backup of /etc/my.cnf.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  10. #10
    Member feldon27's Avatar
    Join Date
    Mar 2003
    Location
    Houston, TX
    Posts
    39

    Default

    When I said the 'backup part' of my.cnf, I meant, of course, the [mysqldump] section of /etc/my.cnf. There isn't another MySQL config file I should be editing instead of /etc/my.cnf is there?

    Of course I have removed the pico httpd.conf part and resumed automated backups of all my databases and have already downloaded copies of all of the gzipped backups. It amazes me how few people do off-site backup to their PC.

Similar Threads & Tags
Similar threads

  1. Mysqldump error in VPS
    By jolly in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-15-2010, 12:13 PM
  2. mysqldump errors during cpbackup
    By kdarray in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 11-13-2008, 04:43 PM
  3. Error when running mysqldump
    By Jeff75 in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 12-31-2004, 10:33 AM
  4. mysqldump problem
    By fishfreek in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 05-07-2004, 06:31 PM
  5. pkgacct - mysqldump: not found
    By TCSLEA in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-20-2003, 02:35 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube