Home > Database > Mysql Tutorial > body text

How to check the port number of mysql in ubuntu

WBOY
Release: 2023-06-03 21:46:02
forward
2882 people have browsed it

1. Log in to mysql.

Open the terminal and enter the command: "# mysql -uroot -p".

[root@localhost ~]# mysql -uroot -p
Copy after login

Enter password: Enter the database password;

2. Then enter the command "show global variables like 'port';" to view the port number.

mysql> show global variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.00 sec)
Copy after login

Here 3306 is the port number.

The above is the detailed content of How to check the port number of mysql in ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template