Menu

what sections are read by read_default_file?

Help
Danny
2007-12-10
2012-09-19
  • Danny

    Danny - 2007-12-10

    The documentation for mysql hints at two sections, '[client]' and '[your_prog_name]'. My question is, what would be the program name? Is it the name of the script being executed in python? Is it the name of the python library? Any ideas? I've looked through the documentation and even the source some and can't find any indications of what this value might be.

    =http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html
    By using mysql_options() the MySQL library reads the [client] and [your_prog_name] sections in the my.cnf file which ensures that your program works, even if someone has set up MySQL in some non-standard way.
    =

    Thanks!

    --
    Danny.

     
    • Andy Dustman

      Andy Dustman - 2007-12-11

      The connect() method supports both read_default_file and read_default_group. HOWEVER, a default file is only read if at least one of these options is specified. If you specify only read_default_file, it will read from the client section by default. Use read_default_group to specify a different section.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.