Description:
When running the mysql client thus:
mysql --port=5900
it may still not use that port, but reverts to the defaults. I.e. I expected it to act like
mysql --port=5900 --protocol=TCP
(which does work)
since I had specified a TCP port, I anticipated it getting used.
Note that the same thing is present in mysqladmin (you need to specify both port and protocol, at times, to get the port to work).
Thank you!
-Roger
How to repeat:
Install mysql like normal.
Now create a second 'side by side' concurrently running daemon (on a different port)
thus:
create new.cnf:
[mysqld]
port=8900
datadir=/home/roger/mysql/
socket=/home/roger/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
local-infile=1
[mysql.server]
user=roger
basedir=/var/lib
# basedir left the same
local-infile=1
[mysqld_safe]
log-error=/home/roger/mysql/mysqld.log
pid-file=/home/roger/mysql/mysqld.pid
[client]
loose-local-infile=1
now go to that data directory that you want, run
mysql_install_db --user=roger --ldata=.
mysqld_safe --defaults-file=./my.cnf --user=roger --skip-locking & # maybe nohup this command ?
and it might (should) start it for you...I think....
/usr/bin/mysqladmin --port=8900 --protocol=TCP -u root password 'dbadmin' # works
/usr/bin/mysqladmin --port=8900 -u root password 'dbadmin' # does not work, when you'd think it would.
Suggested fix:
One way to fix this would be to output a warning if a user specifies a TCP port on the command line and the port ever used ("warning tcp port specification ignored"), and/or to have a verbose mode showing exactly which port IS being used, to make debugging this less painful.