Home >Database >Mysql Tutorial >Linux下修改MySQL端口

Linux下修改MySQL端口

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:19:031331browse

环境 RedHat Linux 9 VWWare 8.0 SSH 3.2.9 Putty 0.62 MySQL 3.2 问题 Linux 下修改 MySQL 端口 解决 1. vi /etc/my.cnf 2. 参考以下配置 [mysqld]#修改为你想要改的端口port=3306 datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock[mysql.server]us

环境

RedHat Linux 9 + VWWare 8.0 + SSH 3.2.9 + Putty 0.62 + MySQL 3.2

        

问题

Linux下修改MySQL端口

 

解决

1.      vi /etc/my.cnf

2.       参考以下配置

 

[mysqld]
#修改为你想要改的端口
port=3306 
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mYsqld/mysqld.pid


 

参考资料

 

mysql修改端口

http://hi.baidu.com/ygkjwvkyjbhivzr/item/9dba432b173d34152b0f1cb6

 

 

Linux环境下修改MySQL端口

http://www.linuxidc.com/Linux/2008-06/13564.htm

 

Statement:
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