Heim  >  Artikel  >  Datenbank  >  Linux下修改MySQL端口

Linux下修改MySQL端口

WBOY
WBOYOriginal
2016-06-07 15:19:031282Durchsuche

环境 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

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn