Java项目上线之云服务器环境篇(三)——MySQL的安装与配置
详细安装步骤如下:
rpm -qa | grep mysql
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
yum -y install wget
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo yum install mysql-server
mysql -u root
chown root /var/lib/mysql/
service mysqld restart
service mysqld restart
use mysql;
update user set password=password('123456') where user='root';
exit;
service mysqld restart
mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";
service mysqld restart
systemctl stop firewalld.service