[MDEV-12961] Client conf files Created: 2017-05-31 Updated: 2018-03-21 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.2.6 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Olaf van der Spek | Assignee: | Georg Richter |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| 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.
Error: Can't connect to MySQL server on 'localhost' (0) |
| Comments |
| Comment by Sergei Golubchik [ 2017-05-31 ] |
|
This is one of the cases where MySQL documentation doesn't apply directly to MariaDB. No version of MariaDB ever read .mylogin.cnf On Windows libmariadb reads my.cnf and my.ini in C:\, current directory, %WINDOWS% and %HOMEPATH%. |
| Comment by Olaf van der Spek [ 2017-05-31 ] |
|
Thx! Where do I find the docs on this? And in what file do I find the code? |
| Comment by Sergei Golubchik [ 2017-05-31 ] |
|
https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ — it's about the server, but the client library is using similar rules. https://github.com/MariaDB/mariadb-connector-c/blob/master/libmariadb/ma_default.c |
| Comment by Olaf van der Spek [ 2017-05-31 ] |
|
1. I can't find HOMEPATH @ https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ 4. _mariadb_get_default_file seems to return the first file it finds only. |
| Comment by Sergei Golubchik [ 2017-05-31 ] |
|
yes, I've noticed that too, this looked strange to I asked the author for the confirmation. it's |
| Comment by Olaf van der Spek [ 2017-05-31 ] |
|
Thanks, what about the other points? |
| Comment by Sergei Golubchik [ 2017-05-31 ] |
|
What I told about paths (including %HOMEPATH%) was, basically, directly copied from ma_default.c. When |
| Comment by Olaf van der Spek [ 2017-05-31 ] |
|
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. |
| Comment by Sergei Golubchik [ 2017-05-31 ] |
|
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 |
| Comment by Olaf van der Spek [ 2017-05-31 ] |
|
It'd actually be nice if the client did, to mimic the behaviour on Linux. |
| Comment by Olaf van der Spek [ 2018-03-14 ] |
|
I can't get this to work.. I've tried both my.cnf and my.ini in c:\ and c:\windows my.ini: C:\vc\vcpkg\buildtrees\libmariadb\src\mariadb-connector-c-3.0.2\libmariadb\ma_default.c: 275: The trailing space and the missing first char are NOT typos.. |