[MDEV-14706] MySQL command line tool can ignore "--port" argument without giving warning Created: 2017-12-19 Updated: 2017-12-28 Resolved: 2017-12-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | 10.0, 10.2.9 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Don Lindsay | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Fedora 21 and Fedora 27, both x86_64 |
||
| Description |
|
I have a box running MariaDB at the usual port, 3306. then I get connected to the containerized MariaDB, as expected. But if I leave off the host specifier and just say: mysql --port=3310 then I get connected to the non-containerized MariaDB at the default port, 3306. There is no warning or error message that this is happening, even if I specify "-v -v -v". This is a bug. It should either not do that, or else it should issue a warning, or else the documentation should specify this behavior. |
| Comments |
| Comment by Daniel Black [ 2017-12-19 ] |
|
I suspect its using a UNIX socket. Can you please show \s output after connecting. --protocol=TCP would be required to connect to a port. |
| Comment by Don Lindsay [ 2017-12-19 ] |
|
You are correct. When talking to the container, "\s" reports: But if I leave off the " Thanks for the comment: I didn't know about "\s". We now have a clue about how the behavior arises. |
| Comment by Ian Gilfillan [ 2017-12-28 ] |
|
Which protocol is used was already reasonably well-documented in https://mariadb.com/kb/en/library/mysql-command-line-client/#how-to-specify-which-protocol-to-use-when-connecting-to-the-mysqld-server but I've added a specific mention of port being ignored as an example. |
| Comment by Don Lindsay [ 2017-12-28 ] |
|
That's not an acceptable fix. "The facts are somewhere on the internet" only helps the person who is googling after being bitten by a bug. It does not help the person who is trying to construct a correct command. Please improve the man page, or the "--help". Or, even better, get the command to issue a warning saying that it plans to ignore what the user has explicitly asked for. |