編輯/etc/my.cnf檔案,早期版本有可能是my.conf檔名,增加埠引數,並且設定埠,注意該埠未被使用,儲存退出。
[root@test etc]# vi my.cnf[mysqld]port=3506datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0[mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid"my.cnf" 11L, 261C written[root@test etc]#
重新啟動mysql
[root@test ~]# /etc/init.d/mysqld restartStopping mysqld: [ OK ]Starting mysqld: [ OK ]
編輯/etc/my.cnf檔案,早期版本有可能是my.conf檔名,增加埠引數,並且設定埠,注意該埠未被使用,儲存退出。
[root@test etc]# vi my.cnf[mysqld]port=3506datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0[mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid"my.cnf" 11L, 261C written[root@test etc]#
重新啟動mysql
[root@test ~]# /etc/init.d/mysqld restartStopping mysqld: [ OK ]Starting mysqld: [ OK ]