How To Connect to MySQL Server on a Different Port

Q

How To Connect to MySQL Server on a Different Port? - MySQL FAQs - Server Daemon mysqld Administration

✍: FYIcenter.com

A

If your MySQL server is listening on port number different than 3306, you need to specify "--port=portNumber" option to any client program that needs to connect to the server. The tutorial exercise shows you how to connect "mysql" to start the server to listen to a different port number:

\mysql\bin\mysql -u root -pretneciyf --port=8888 test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.24

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

2007-05-11, 4781👍, 0💬