赞
踩
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
systemctl start mysqld.service
查看MySQL运行状态,运行状态如图:systemctl status mysqld.service
要修改密码要先通过默认的root密码进入
获取默认密码:grep "password" /var/log/mysqld.log
有密码之后进入数据库:mysql -uroot -p
进来之后必须修改密码,不然也操作不了数据库:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your password';
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
刷新 flush privileges;
添加mysql端口3306和Tomcat端口8080
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=8080/tcp --permanent
重新载入
firewall-cmd --reload
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。