首先安装mysql5.6的rpm
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
5.7的源:http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
安装mysqlyum install mysql-community-server
运行mysqldsystemctl start mysqld
查看mysqld的运行状态和一些初始化的提示systemctl status mysqld
可以看到设置默认密码的几种方式
/usr/bin/mysqladmin -u root password 'new-password'
开机启动mysqldsystemctl enable mysqld
授权远程访问mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> grant all privileges on . to root@'%' identified by "password";
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
打开3306端口的访问firewall-cmd --add-port=3306/tcp --permanent
firewall-cmd --reload
点击查看更多内容
5人点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦