Bug #14525 mysql ignores MYSQL_TCP_PORT
Submitted: 31 Oct 2005 21:15 Modified: 31 Oct 2005 21:17
Reporter: Michael McLagan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.15 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[31 Oct 2005 21:15] Michael McLagan
Description:
mysql command line program does not use the MYSQL_TCP_PORT environment variable.  I have a server running on a non-standard port, 3307.  I have two environment variables:

[mmclagan@linux lib]$ set | grep MYSQL
MYSQL_HOST=db.thecountrychristmasshoppe.com
MYSQL_TCP_PORT=3307

[mmclagan@linux lib]$ mysql
ERROR 2003 (HY000): Can't connect to MySQL server on 'db.thecountrychristmasshoppe.com' (111)

[mmclagan@linux lib]$ mysql -P 3307
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 40 to server version: 4.1.14-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye

How to repeat:
See description above

Suggested fix:
Check the environment variable.
[31 Oct 2005 21:17] Jim Winstead
This is a duplicate of Bug #5792.
[31 Oct 2005 21:29] Michael McLagan
Sorry about that.  I tried a couple of searches and didn't end up finding it.