# Rpm-qa |grep MySQL # # to see if the MySQL database is already installed on the operating system, if so, by RPM-e command or RPM-E--nodeps command to uninstall out # yum install MySQL-server MySQL mysql-devel# service mysqld start# chkconfig--list |grep mysqldmysqld0:off 1:off 2:off 3:off 4:off 5:off 6: Off with the above command to see that MySQL does not set the boot boot, so you need to set up boot # chkconfig mysqld on in order to facilitate remote management, the firewall opens3306Port # VI/etc/sysconfig/iptables-A input-m state--state new-m tcp-p TCP--dport 3306-J Accept Restart Firewall for port configuration to take effect # service iptables Restart set MySQL database root user password: # mysqladmin-U root password ' root 'Login Database: # mysql-U Root-pmysql authorizing remote access (first log in to MySQL with root) MySQL> GRANT All privileges on * * to ' root ' @ '% ' identified by ' root 'withgrant Option;mysql> FLUSH privileges;
# Rpm-qa | grep MySQL # see if the MySQL database is already installed on the operating system, and if so, you can uninstall it via the RPM-E command or the rpm-e--nodeps command. # yum install mysql-server MySQL MySQL -devel# service mysqld start# chkconfig--list | grep mysqldmysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off Use the above command to see that MySQL is not set to boot, so you need to set the boot up # chkconfig mysqld on in order to facilitate remote Management, firewall open 3306 Port # vi/etc/sysconfig/iptables-a input-m State--state new-m tcp-p TCP--dport 3306-j Accept restart firewall to enable port configuration Effective # service Iptables restart set MySQL database root user password: # mysqladmin-u root password ' wusc.123 ' login database: # mysql-u Root-pmysql Authorize remote access (log in to MySQL with Root first) mysql> GRANT all privileges on * * to ' root ' @ '% ' identified by ' wusc.321 ' withgrant option;mysq l> FLUSH privileges;
170425. CentOS Installation mysql5.6 Database