Download MySQL Address
http://dev.mysql.com/downloads/mysql/
Select the following
To see if a MySQL installation package exists
Rpm-qa|grep-i MySQL
Remove MySQL installation package --nodeps Ignore dependencies
RPM-E--nodeps mysql-libs-5.1.61-4.el6.i686
Installing the MySQL server
RPM-IVH mysql-server-5.5.50-1.el6.i686.rpm
Installing the MySQL Client
RPM-IVH mysql-client-5.5.50-1.el6.i686.rpm
--------------------------------------------------------
Configure MySQL initial password
Mysqladmin-uroot Password root
Mysqladmin-u root-p Password 1234
If there is an error in the above configuration
Then use the following methods
[Email protected] mysql]# mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
mysql> UPDATE user SET Password=password (' root ') where user= ' root ';
mysql> FLUSH privileges;
-------------------------------------------------------
Mysql
Change your password after logging in
Set Password=password (' 123 ');
Add to System Services list
Chkconfig--add MySQL
Auto Start
Chkconfig MySQL on
View the auto-start list
Chkconfig
Log in to MySQL
For example, if you want root to connect to a MySQL server from any host using the root password.
GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;
If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.6 and use MyPassword as the password
GRANT all privileges on * * to ' myuser ' @ ' 192.168.1.3 ' identified by
' MyPassword ' with GRANT OPTION;
Need to refresh to take effect
FLUSH Privileges
Switch to External
Open 3306 Ports
/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT
Save firewall rules
/etc/rc.d/init.d/iptables Save
Refresh Firewall Rules
Service Iptables Save
Service Iptables Restart
All of the above two.
Viewing port opening conditions
/etc/init.d/iptables status
ls | grep mysql File search
The above configuration under centos6.3, I will all the required dependencies have been installed, if there are related errors, please install the appropriate dependent LIB file
"Linux" installation mysql common configuration