当前位置:网站首页>Centos8 install MySQL 8.0 using yum x
Centos8 install MySQL 8.0 using yum x
2022-07-07 01:54:00 【[email protected]】
Catalog
First step : add to MySQL Yum The repository
The third step : install mysql
Step four , start-up mysql, And set it to boot
Step six ,Linux Login and local login tests
First step : add to MySQL Yum The repository
yum -y install https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm
The second step : use yumyum makecache Download the package information of the server to the local computer and cache it
yum makecache
The third step : install mysql
sudo yum -y install mysql-community-server
Installation successful !!!!
Step four , start-up mysql, And set it to boot
Execute it first , After successful startup, execute the next step to set it as startup
systemctl start mysqld
Set boot up
systemctl enable mysqld
Step five , Change password
First check the default generated password , The default password is the last output [email protected]: All the back
sudo grep 'temporary password' /var/log/mysqld.log
Sign in , Then the password is automatically generated by the one above
mysql -uroot -p
Then the next step is to change the password , Just step by step
mysql>set global validate_password.policy=0;
mysql>set global validate_password.length=4;
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password By 'newPassword'; # Change Password
mysql>flush privileges;
mysql>update mysql.user set host = '%',plugin='mysql_native_password' where user = 'root'; # All hosts can access
mysql>flush privileges;
mysql>exit;
# Note that the initialization password must match the length , And must contain numbers , Lowercase or capital letters , Special characters .
If the following two items are wrong :ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
Run the following command first .
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password By '[email protected]';
Step six ,Linux Login and local login tests
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207061817145762.html
边栏推荐
- Let's see how to realize BP neural network in Matlab toolbox
- 454-百度面经1
- ROS学习(十九)机器人SLAM功能包——cartographer
- First experience of JSON learning - the third-party jar package realizes bean, list and map to create JSON format
- C language instance_ five
- 增加 pdf 标题浮窗
- AcWing 1142. Busy urban problem solving (minimum spanning tree)
- AcWing 1140. 最短网络 (最小生成树)
- C language instance_ two
- Gin introduction practice
猜你喜欢
随机推荐
Set WordPress pseudo static connection (no pagoda)
Ds-5/rvds4.0 variable initialization error
Basic introduction and use of dvajs
ROS learning (XX) robot slam function package -- installation and testing of rgbdslam
Related programming problems of string
公钥\私人 ssh避password登陆
Appium自动化测试基础 — uiautomatorviewer定位工具
初识MySQL
According to the analysis of the Internet industry in 2022, how to choose a suitable position?
Telnet,SSH1,SSH2,Telnet/SSL,Rlogin,Serial,TAPI,RAW
AcWing 1140. Shortest network (minimum spanning tree)
Instructions for using the domain analysis tool bloodhound
ROS學習(23)action通信機制
Scenario practice: quickly build wordpress blog system based on function calculation
Blue Bridge Cup 2022 13th provincial competition real topic - block painting
蓝桥杯2022年第十三届省赛真题-积木画
DS-5/RVDS4.0变量初始化错误
ZOJ problem set – 2563 long dominoes [e.g. pressure DP]
Batch delete data in SQL - set in entity
C language instance_ three