当前位置:网站首页>Installing MySQL 8 on Linux centos7 (simple and practical)
Installing MySQL 8 on Linux centos7 (simple and practical)
2022-04-21 19:33:00 【The beginning is the end】
Catalog
There are many installations on the Internet mysql Methods , But it's too much and too complicated , So record my installation process , Convenient for later use
install
Check to see if there is mysql Residual :rpm -qa | grep mysql If there is residue, you need to uninstall .
install wget: yum -y install wget
download MySQL Warehouse :
wget https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm
install :
yum -y install mysql80-community-release-el7-3.noarch.rpm

install mysql:yum -y install mysql-community-server --nogpgcheck
start-up mysql:systemctl start mysqld.service
land
View the default password :cat /var/log/mysqld.log | grep password
![]()
root@localhost: And then there's the code , Be careful No, Space
land :mysql -uroot -p
Change Password
After successful login , Need to change password ( Upper and lower case alphanumeric characters )
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root_123';
![]()
If you want a simple password , It needs to be set , However, you must change the complex password above before you can perform the following operations
Set the minimum length to 4 position :set global validate_password.length=4;
Set the complexity to a minimum ( Just match the length ): set global validate_password.policy=0;

If you want to set the same password and account , It also needs to be :set global validate_password.check_user_name=OFF;
Then you can change the simple password :ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
![]()
Remote login
If you want to log in to the database remotely , You need to execute the following three commands :
create user 'root'@'%' identified with mysql_native_password by '123456';
123456 The password of remote login can be changed to be complex , It can be different from the local login above .
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;

If you want to change the password of the remote login account :
alter user 'root'@'%' identified with mysql_native_password by '123.com';
use navicat Remote connection database
Choose new mysql Connect

Fill in the information

Server's ip You need to use the command to view
If it's a virtual machine : Direct command :ip a

If it is an ECS, enter a command to view the public network ip: curl inet-ip.info

版权声明
本文为[The beginning is the end]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211929061337.html
边栏推荐
- Sleuth + Zipkin link tracking
- 关系型数据库与非关系型数据库概述,Redis简介、常用命令及优化
- MKL库矩阵乘法
- How to classify cosmetics in the management system?
- 【网络协议】ip addr
- An important trend in the development of children's programming training
- switch分支
- How to set the TS slice file size for the new kernel version of easycvr?
- MySQL de duplication query
- Robot framework log output Chinese garbled code
猜你喜欢

MySQL throughput

Chekine series high density lipoprotein (HDL-C) content detection scheme

使用mRemoteNG工具管理所有远程连接
Learn MySQL performance tuning and make your database smooth

Robot framework log output Chinese garbled code

Using 8266 as serial port debugging tool 2

Analysis of service registration source code of Nacos

自动控制原理第5章——频率法(思维导图)

自动控制原理第6章——控制系统的校正及综合(思维导图)

Relationship between deep learning, multi machine and multi card batchsize and learning rate
随机推荐
Rk3399—添加usb转串口驱动
How does the national standard gb28181 platform easygbs turn on the voice intercom function?
SIGIR'22 "Ali" metacvr: meta learning alleviates the problem of data distribution fluctuation in small-scale recommendation
Interpretation of YACs in detectron 2
[advanced C language] ⑥ detailed explanation of function pointer
Machine learning notes - Trace operator (tracking operator)
每日CISSP认证常错题(2022年4月20日)
Analysis of service registration source code of Nacos
Introduction to GPS Beidou satellite time synchronization system (clock device) technology of power grid
自动控制原理第5章——频率法(思维导图)
《数字电子技术基础》5.1 触发器 概述
mysql (三) 索引优化以及案例分析
Ribbon原理与Nacos的服务发现原理分析
第五章 使用 matplotlib 绘制饼图
What are the factors affecting VPS website optimization?
The local datetime problem of shardingjdbc
MusicPlayer2.1版本
Shandong University project training (IV) adding click events to multiple point markers
[leetcode] daily question: goat Latin
关系型数据库与非关系型数据库概述,Redis简介、常用命令及优化