Home > Database > Mysql Tutorial > CentOS7 installation and configuration MySQL

CentOS7 installation and configuration MySQL

PHP中文网
Release: 2017-07-09 18:14:15
Original
1167 people have browsed it

1. Download MySQL Yum Repository
2. Install MySQL Yum Repository locally
sudo yum localinstall platform-and-version-specific-package-name.rpm
3. Install MySQL
sudo yum -y install mysql-community-server
4. View root initial password
sudo grep 'temporary password' /var/log/mysqld.log
5. Perform security settings
mysql_secure_installation
6. Set character set
vi /etc/my.cnf
[mysql]
default-character-set=utf8
[mysqld]
character_set_server=utf8
7. Set up startup
chkconfig --levels 235 mysqld on
8. Turn off CentOS firewall
firewall-cmd --permanent --zone=public --add-port=3306/tcp
firewall-cmd --permanent --zone=public --add-port=3306/udp
firewall-cmd --reload
9. Create remote access user
CREATE USER 'bounter'@'%' IDENTIFIED BY '111111@Bounter';
GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'bounter'@'%';
flush privileges;
10. Start and shut down the MySQL service
sudo service mysqld start
sudo service mysqld stop

The above is the detailed content of CentOS7 installation and configuration MySQL. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template