当前位置:网站首页>Alibaba cloud centos7 installation and remote link MySQL
Alibaba cloud centos7 installation and remote link MySQL
2022-07-16 06:12:00 【BeforeEasy】
Suppose it is a new Alibaba cloud server centos7
to update yum
yum update -y
download mysql Source
Yes It does not provide
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
Then add
sudo yum localinstall mysql80-community-release-el7-3.noarch.rpm
install yum Tools The actual measurement is quite important
sudo yum install -y yum-utils
View available mysql
yum repolist enabled | grep "mysql.*-community.*"
View all Mysql edition
yum repolist all | grep mysql
install mysql
sudo yum install -y mysql-community-server
It may take a long time
start-up mysql service
sudo service mysqld start
That's it I tried and the others couldn't start Meeting unit can’t find
see mysql state
sudo service mysqld status
In theory, everything is normal. At this time, we should active running
MySQL initialization
Check the original password :
sudo grep 'temporary password' /var/log/mysqld.log
Log in with the password shown above :
mysql -u root -p
Set new password :
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your!NewPass1';
Be case sensitive There are numbers There are special symbols
Set boot up
systemctl enable mysqld
Set up a remote connection
Log in to the database
Execute the following statements in sequence :
use mysql;
update user set host="%" where user='root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your!NewPass1' WITH GRANT OPTION;
flush privileges;
exit;
restart mysql
If the firewall is on by default , Need configuration 3306
firewall-cmd --permanent --zone=public --add-port=3306/tcp
important ! If it's Alibaba cloud , Manual field safety group is required !
I've been treading on pits here for a day
Console -> example -> Security group -> Configuration rules Add an entry direction rule 
And then you can use it navicat Tested !
边栏推荐
- 如何解决数据流转「不可能三角」难题?
- Analyse, capture et simulation du Protocole ARP par sniffer pro
- 宏定义导致三目运算结果不正确
- 40.js -- the same name identifier promotion problem
- MSF利用永恒之蓝渗透win2003
- 計算LocalDate之間的天數差,方便快捷
- MySQL master-slave server configuration experiment centos7
- 将BufferedImage转为byte[]数组,亲测可用
- JS array de duplication
- MSF Foundation
猜你喜欢

Analysis of error monitoring principle

Vue+axios+mysql realizes paging query, condition query and batch deletion

摩斯隐私计算一体机全项通过深圳国金测评中心83项测评

Notes 2 of network communication security

Ant group open source large-scale video infringement positioning data set

Do you really understand JS event cycle

About the installation and use of visual studio 2022

C语言经典100题练习(1~21)

网络通信安全部分笔记一

rollup 打包实践
随机推荐
Es6--string (string)
《sql必知必会》系列1基础检索相关
消息转发机制--拯救你的程序崩溃
董军宇教授在 “同心坚守 研学战疫”学术系列活动做报告
如何导出微信聊天记录
MySQL-约束
【ARXIV2204】Simple Baselines for Image Restoration
宏定义导致三目运算结果不正确
sniffer Pro对ARP协议的分析、捕获与模拟攻击
图形图像编程实践 课程报告
【ARXIV2205】Inception Transformer
ES6 -- arrow function
摩斯隐私计算一体机全项通过深圳国金测评中心83项测评
录音、上传、播放音频微信小程序实践
chrome浏览器91版本SameSite by default cookies被移除后的解决方案,Chrome中跨域POST请求无法携带Cookie的解决方案
Convert bufferedimage into byte[] array, and the pro test is available
MSF利用永恒之蓝渗透win2003
41.js -- closure
Compilation principle - parser design
Make 3D navigation bar step by step