Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3803

mysqladmin cannot be executed if ~/.my.cnf contains database=XXX string

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Not a Bug
    • Affects Version/s: 5.5.27
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian Squeeze i386 / Official MariaDB packages

      Description

      root@v1194:~# grep database ~/.my.cnf
      database=mysql
      root@v1194:~# mysqladmin
      mysqladmin: unknown variable 'database=mysql'
      

      While the database=DBNAME parameter is read and used by the mysql command line client and mytop it makes mysqladmin to fail.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            This is not a bug. See mysql --help and mysqladmin --help. mysql command line client has a --database option, while mysqladmin does not. That's why mysql recognizes it in the my.cnf and mysqladmin does not. The [client] section in the my.cnf is read by all mysql clients (again, see the --help output of mysql and mysqladmin). You have two options:
            1. use the "loose" prefix: loose-database=mysql. It will cause mysqladmin to ignore unknown options, it won't abort.
            2. move the database option to the [mysql] section of the my.cnf, this section is read only by the mysql command line client, and not by mysqladmin.

            Show
            serg Sergei Golubchik added a comment - This is not a bug. See mysql --help and mysqladmin --help. mysql command line client has a --database option, while mysqladmin does not. That's why mysql recognizes it in the my.cnf and mysqladmin does not. The [client] section in the my.cnf is read by all mysql clients (again, see the --help output of mysql and mysqladmin). You have two options: 1. use the "loose" prefix: loose-database=mysql. It will cause mysqladmin to ignore unknown options, it won't abort. 2. move the database option to the [mysql] section of the my.cnf, this section is read only by the mysql command line client, and not by mysqladmin.
            Hide
            jb-boin Jean Weisbuch added a comment -

            Didnt't knew about that "loose-" prefix ; it should be implemented it to mytop then (unknown options only throws a warning on mytop so its not an important feature).

            Show
            jb-boin Jean Weisbuch added a comment - Didnt't knew about that "loose-" prefix ; it should be implemented it to mytop then (unknown options only throws a warning on mytop so its not an important feature).

              People

              • Assignee:
                Unassigned
                Reporter:
                jb-boin Jean Weisbuch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: