linux mysql 端口号修改
一、查看默认端口号
1、登录mysql
[ ~]# mysql -uroot -p
Enter password: 输入数据库密码;
2、使用show global variables like ‘port‘; 命令查看端口号,
mysql> show global variables like ‘port‘;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.00 sec)
mysql>
3306即为端口号。
二、mysql端口号的修改
1、编辑/etc/my.cnf文件 [ ~]# vi /etc/my.cnf
2、添加port=2032;
3、重启mysql [ ~]# /etc/init.d/mysqld restart
--------------------- 本文来自 此刻的丶 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/b551500/article/details/79677655?utm_source=copy
相关推荐
winki 2020-08-19
码农专业户 2020-07-20
AngelaDan 2020-06-16
hulao 2020-06-13
sapliang 2020-04-30
蒜蓉粉丝蒸扇贝 2020-04-16
heheeheh 2020-04-14
julien 2020-03-08
wxthillwill 2020-03-06
fangxiaoji 2020-01-24
OwenJi 2020-01-17
TWaver可视化 2020-01-11
jackalwb 2020-01-01
sunln00 2019-12-20
byourb 2019-12-18
Neptune 2019-12-15