Details

    Description

      I'm using libmariadb 2.3.2 from vcpkg on Windows 10.

      What conf files is this supposed to read? I can't find the docs.
      MySQL says it reads %APPDATA%\MySQL\.mylogin.cnf but I can't get it to work.

      mysql_init(&m_handle);
      mysql_options(&m_handle, MYSQL_READ_DEFAULT_GROUP, "");
      mysql_real_connect(&m_handle, "", "", NULL, database.c_str(), 0, NULL, 0));
      

      C:\Users\Olaf\AppData\Roaming\MySQL\.mylogin.cnf

      [client]
      host = debian
      user = root
      

      Error: Can't connect to MySQL server on 'localhost' (0)
      After I hard-code the host: Access denied for user 'Olaf'@'192.168.157.1' (using password: NO)

      Attachments

        Issue Links

          Activity

            What I told about paths (including %HOMEPATH%) was, basically, directly copied from ma_default.c.

            When MDEV-12965 is fixed, libmariadb should do what https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ says.

            serg Sergei Golubchik added a comment - What I told about paths (including %HOMEPATH% ) was, basically, directly copied from ma_default.c . When MDEV-12965 is fixed, libmariadb should do what https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ says.

            But https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ says nothing about HOMEPATH on Windows does it? So IMO that page should be updated as well.
            Then there's item 2, which is separate from item 4. And there's item 3.

            XTF Olaf van der Spek added a comment - But https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ says nothing about HOMEPATH on Windows does it? So IMO that page should be updated as well. Then there's item 2, which is separate from item 4. And there's item 3.

            Yes, I took HOMEPATH from ma_default.c. KB doesn't say anything about HOMEPATH because the server and libmysqlclient don't look there. After MDEV-12965, libmariadb will be doing the same. That is, it will do what KB page says.

            serg Sergei Golubchik added a comment - Yes, I took HOMEPATH from ma_default.c . KB doesn't say anything about HOMEPATH because the server and libmysqlclient don't look there. After MDEV-12965 , libmariadb will be doing the same. That is, it will do what KB page says.

            It'd actually be nice if the client did, to mimic the behaviour on Linux.
            An unprivileged user might not have write access to the other locations.

            XTF Olaf van der Spek added a comment - It'd actually be nice if the client did, to mimic the behaviour on Linux. An unprivileged user might not have write access to the other locations.
            XTF Olaf van der Spek added a comment - - edited

            I can't get this to work.. I've tried both my.cnf and my.ini in c:\ and c:\windows
            libmariadb:x86-windows 3.0.2

            my.ini:
            [client]
            host = debian
            user = root
            password = 123

            C:\vc\vcpkg\buildtrees\libmariadb\src\mariadb-connector-c-3.0.2\libmariadb\ma_default.c: 275:
            set_option(mysql, "host ", "ebian");

            The trailing space and the missing first char are NOT typos..

            XTF Olaf van der Spek added a comment - - edited I can't get this to work.. I've tried both my.cnf and my.ini in c:\ and c:\windows libmariadb:x86-windows 3.0.2 my.ini: [client] host = debian user = root password = 123 C:\vc\vcpkg\buildtrees\libmariadb\src\mariadb-connector-c-3.0.2\libmariadb\ma_default.c: 275: set_option(mysql, "host ", "ebian"); The trailing space and the missing first char are NOT typos..

            People

              georg Georg Richter
              XTF Olaf van der Spek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.