当前位置:网站首页>Install MySQL in ECS (version 2022)
Install MySQL in ECS (version 2022)
2022-06-22 21:08:00 【Call me uncle】
Catalog
1、 Check if it has been installed before
2、 Download the official Mysql package
7、 Check the initial password ( The red part is the initial password )
Two 、 Error reporting and solutions
One 、 Installation steps
1、 Check if it has been installed before
rpm -qa| grep mysql
Normal is not , If it has been installed, you can delete it with the following command
rpm -e file name 2、 Download the official Mysql package
- Enter into usr/local

- Download the official Mysql package
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

3、 install MySQL package
yum -y install mysql57-community-release-el7-10.noarch.rpm
4、yum install MySQL
yum -y install mysql-community-server --nogpgcheck
5、 start-up MySQL service
systemctl start mysqld.service
6、 see MySQL Running state
service mysqld status
7、 Check the initial password ( The red part is the initial password )
grep 'password' /var/log/mysqld.log
8、 Access to database
mysql -u root -p
9、 Set password free login
exit; sign out mysql>
close mysql service
service mysqld stop
adopt vi Enter file
vi /etc/my.cnf

10、 Restart the service
start mysqld.service
mysql -u root -p

adopt show databases; Remember to bring a semicolon

Enter the configuration file my.cnf in , Delete skip-grant-tables restart , Landing at


Two 、 Error reporting and solutions
problem :
When connecting to the database, the following error will be reported if the connection fails

terms of settlement :
- The following error will be reported when entering the database

terms of settlement :
mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=1;
mysql> SET PASSWORD = PASSWORD('123456789');
mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
mysql> flush privileges;
The reason is that the password is too simple , Just do it

- modify usr Below host
mysql> use mysql;
mysql> show tables;
mysql> select user from user;
mysql> select host,user,authentication_string from user;
mysql> update user set host='%' where user='root';
----- restart ----------
service mysqld restart



边栏推荐
猜你喜欢

【20. 有效的括号】

R language CO2 dataset visualization

Moke 6. Load balancing ribbon

R 语言 UniversalBank.csv“ 数据分析

Alibaba cloud video on demand playback error, console access code:4400

Ultrafast transformers | redesign vit with res2net idea and dynamic kernel size, surpassing mobilevit

R language universalbank CSV "data analysis

【138. 复制带随机指针的链表】
![[160. cross linked list]](/img/79/177e2c86bd80d12f42b3edfa1974ec.png)
[160. cross linked list]
![[redis]发布与订阅](/img/50/0c2fbbb8f56fccdd3222b77efdd723.png)
[redis]发布与订阅
随机推荐
73-找到业务高峰时段的sql示例(报表开发类)
【剑指Offer】面试题44.数字序列中的某一位数字
Visualization of R language nutrient dataset
百家讲坛 雍正十三年(下部)
Golang learning notes - structure
[206. reverse linked list]
[redis]集群与常见错误
86-给参加<SQL写法与改写培训>的学员补充一个二手案例
评估指标及代码实现(NDCG)
R language universalbank CSV "data analysis
53 page intelligent campus intelligent system design scheme (download attached)
慕课5、服务发现-Nacos
苹果CoreFoundation源代码
89-oracle SQL写法与优化器缺陷一例
92-几个用match_recognize SQL写法示例
R language Midwest dataset visualization
【20. 有效的括号】
Visualization of R language penguins dataset
Résolu: peut - on avoir plus d'une colonne auto - incrémentale dans un tableau
【CM11 链表分割】