System Environment: CentOS 6.3 Server
Windows 7 Client
The IP addresses are 10.1.4.44 server and 10.1.4.180 client respectively.
1. Check whether MySQL is installed?
[Root @ Web_Mysql ~] # Rpm-qa | grep mysql
2. Install MySQL using YUM:
[Root @ Web_Mysql ~] # Yum install mysql-server perl-DBD-MySQL
3. Check to install the Mysql software package:
[Root @ Web_Mysql ~] # Rpm-qa | grep mysql
Mysql-libs-5.1.61-4.el6.i686
Mysql-5.1.61-4.el6.i686
Mysql-server-5.1.61-4.el6.i686
Php-mysql-5.3.3-14.el6_3.i686
4. Restart MySQL and set MySQL to start upon startup.
[Root @ Web_Mysql ~] # Service mysqld restart
[Root @ Web_Mysql ~] # Chkconfig mysqld on
5. Disable SELINUX.
[Root @ Web_Mysql ~] # Vim/etc/selinux/config
SELINUX = disabled # default value: enforcing
6. Add MySQL listening port 3306 to the firewall IPtables
[Root @ Web_Mysql ~] # Vim/etc/sysconfig/iptables
-A input-m state -- state NEW-m tcp-p tcp -- dport 3306-j ACCEPT
: Wq # Save
Restart IPtables
[Root @ Web_Mysql ~] # Service iptables restart
Confirm the installation is successful and start: mysql listening port 3306;
[Root @ Web_Mysql ~] # Netstat-na | grep 3306