my.cnf path setting

2006-08-24
2013-05-29
  • David Leslie

    David Leslie - 2006-08-24

    With the MySQL database that I would like to use this script for I have to pass the path to the my.cnf file as well as the mysql.sock file.

    While I see under the Advance settings the place to pass the sock file (currently set as ), I am unable to find where to place the path to the my.cnf file.

    He is the statement I would have to use in order to run mysqldump by hand.

    ./bin/mysqldump  --defaults-file=/dept/qpbugz/mysql/my.cnf --socket=/dept/qpbugz/mysql/mysql.sock -u root -p qp > qpyyyymmdd.dump

    Any advice as to how to do this with AutoMySQLBackup.

    Thanks,
    David

     
    • Harley

      Harley - 2006-08-27

      Hi,

      Edit line 394 of the file and change it from this..

      OPT="--quote-names --opt"

      to this..

      OPT="--quote-names --opt --defaults-file=/dept/qpbugz/mysql/my.cnf"

      That should do it for you..

       
      • Harley

        Harley - 2006-08-27

        Sorry that should have been line 349.. :p

         
    • David Leslie

      David Leslie - 2006-08-28

      Hey Harley,

      I changed line 349 so that it reads:
      OPT="--quote-names --opt --defaults-file=/dept/qpbugz/mysql/my.cnf"

      I also set line 89 to
      SOCKET=/dept/qpbugz/mysql/mysql.sock

      But I got back the error message:
      mysqldump: unrecognized option `--defaults-file=/dept/qpbugz/mysql/my.cnf'

      Could it be due to the fact we have 4.1 rather than 5?

       
      • Harley

        Harley - 2006-08-28

        I don't know why its throwing the error because the syntax should be correct..

        You could try and change the mysqldump line in the script on line 408 from (changing line 349 back to the original)..

        mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 > $2

        to..

        mysqldump --defaults-file=/dept/qpbugz/mysql/my.cnf --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 > $2

        Which would make it the first option setting but I don't see that this would make any difference..

        Sorry I can't be more help, its not an option I have used before.. Perhaps there is a mysql forum that can shed some light on it for you..

         
    • David Leslie

      David Leslie - 2006-08-29

      I've give that a shot. Thanks for all the help Harley..

       

Log in to post a comment.