Connecting to MySQL Server on a Specific Port in MySQL

Q

How To Connect to MySQL Server on a Different Port in MySQL?

✍: 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.

 

PHP Connections and Query Execution for MySQL

Running MySQL Server on a Specific Port in MySQL

Server Daemon mysqld Administration in MySQL

⇑⇑ MySQL Database Tutorials

2017-11-25, 1660🔥, 0💬