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.

MySQL Dump fails since 5.0.51a

Discussion in 'General Discussion' started by madtom, Sep 17, 2008.

  1. madtom

    madtom Active Member

    Joined:
    Aug 2, 2005
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Since upgrading to mysql 5.0.51a now mysqldump doesn't work.. no dump is created.

    Anyone seen this ??
     
  2. Humayun

    Humayun Member

    Joined:
    Jul 15, 2008
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Do u have any other version of My SQl install in ur server ?? if so then u can go to the bin directory of mysql 5.0.51a where you found mysql dump command now try to exicute mysqldump from there :)

    For example :
    Code:
     /usr/local/path/mysql/bin/mysqldump ......
    
    i hope its works
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    What parameters are you passing to mysqldump?

    What directives are defined in ~/.my.cnf that may impact mysqldump?
     
  4. Ghulam Yaseen

    Ghulam Yaseen Well-Known Member

    Joined:
    Mar 14, 2008
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Karachi,Pakistan
    Yaseen

    Hello :),

    You can pass parameters like this
    --> /usr/bin/mysqldump –-user [user name] –-password=[password] [database name] > [dump file]

    :cool:
     
  5. madtom

    madtom Active Member

    Joined:
    Aug 2, 2005
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Sorry for the delay in replying.

    I'm running:
    mysqldump -u $dbuser --password=$dbpwd $dbname | gzip > $filename

    The variables are specified in my php page.

    This has worked fine, until the ISP upgraded the mysql.

    The script runs, but nothing is created.
    Any ideas ?
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Is this done via a cron job, or a web page?

    For either, which method are you using to access the shell? For example, are you using back ticks, or shell_exec?

    If you manually execute the PHP script, what errors are output? Have yo attempted to use the same command via the command line? If so, are errors output? What are they?
     
  7. madtom

    madtom Active Member

    Joined:
    Aug 2, 2005
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    The php page is run via a cron job.

    $command = "mysqldump -u $dbuser --password=$dbpwd $dbname | gzip > $filename";
    $result = passthru($command);

    The file works as expected.. but no output is created.
    My ISP has tried a simple mysqldump via the shell and this also worked but no output was created.

    Now I'm stuck !!
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You are redirecting STDOUT to $filename. The only output then would be anything logged to STDERR.

    For example:

    Code:
    root@mundane [~]# mysqldump -u tramel --password=temp123 tramel_again
    -- MySQL dump 10.11
    --
    -- Host: localhost    Database: tramel_again
    -- ------------------------------------------------------
    -- Server version	5.0.67-community
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
    
    /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
    
    -- Dump completed on 2008-10-17 21:52:18
    root@mundane [~]# mysqldump -u tramel --password=temp123 tramel_again | gzip -c -f
    ??̣?U???w}-???<?iZ?z?Ba???sma?Mϴ8?t??0e???叽^??????c??\????????p?\?m?_?QcM???h????S? ???[?	
    ?? d TIcn??1uFc"?J?????߻ٽ۔Ν!F?D?l56
                    '? ?4?]??6*?<1?8?T
                                      ?kJR?5D%2?O
                                                 ????k???P&?1g??te~R?	?X?H??X?q?a{?@;??_
    ?u?G??MS?&?jU$S?|?ٳ>)?SU,???9?t?4
                                     ?cR@(???Q{?i[????;?N?&y%|-?8?A??&B]#w???v?h?k??????root@mundane [~]# 
    root@mundane [~]# mysqldump -u tramel --password=temp123 tramel_again | gzip > tramel.gz
    root@mundane [~]# 
    
    The first instance I'm just letting everything go to STDOUT. The second instance is piping it to gzip, then forcing gzip to output to STDOUT (since it won't by default). Then the final instance is like your command, redirecting to a file. Now, errors will still be logged because the redirects are not touching STDERR:

    Code:
    root@mundane [~]# mysqldump -u tramel --password=temp123 tramel_mikal | gzip > tramel.gz
    mysqldump: Got error: 1044: Access denied for user 'tramel'@'localhost' to database 'tramel_mikal' when selecting the database
    
    The above is for a non-existent database.
     
  9. madtom

    madtom Active Member

    Joined:
    Aug 2, 2005
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Thanks.

    My script has worked fine in the past. But since the upgrade to 5.0.51a MYSQLDUMP doesn't work.

    I noticed on the changelog that 5.0.67 is now available.
    My ISP doesn't seem to be able to find it. ??

    Any ideas ?
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    MySQL 5.0.67 support is still propagating through the cPanel builds. Right now it is supported in EDGE and CURRENT. However, if your server is running our more conservative builds: RELEASE (the default) and STABLE, then you do not have MySQL 5.0.67 support yet.

    MySQL 5.0.67 support will need additional QA testing before it propagates to RELEASE and eventually to STABLE. Until that happens, servers will continue to use MySQL 5.0.51a with 2 cPanel patches backporting some bug fixes to 5.0.51a.

    You can keep up-to-date on these issues by monitoring our changelog at http://changelog.cPanel.net - RSS feeds of the changelogs are also available via that page.
     
Loading...

Share This Page