当前位置:网站首页>Linux Installation mysql5
Linux Installation mysql5
2022-06-29 19:49:00 【A vegetable chicken that is working hard】
- centos7
Get ready
1. see Linux Is... Installed in Mysql perhaps Maridb, If installed, there will be output
rpm -qa|grep mysql
rpm -qa|grep mariadb
2. uninstall mysql perhaps maridb
rpm -e --nodeps mysql-libs-5.1.73-7.el6.x86_64
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
MySQL Compressed package
1. download
2. Upload

3. decompression
- tar -xvf mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar
4. After decompression, you get the following rpm package , Install the required... In turn rpm package
- rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm
- rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
- rpm -ivh mysql-community-libs-compat-5.7.36-1.el7.x86_64.rpm
- rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm
- rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm
- If an error is reported , Add... At the end of the above command --force --nodeps
5. Check the installation
- rpm -qa | grep mysql

start-up mysql service
- systemctl start mysqld.service
- If the startup error , It can be executed journalctl -xe Command to view error messages
- Here is an error report

- solve
Check to see if it is installed libaio
rpm -qa | grep libaio
If there is no output, install
yum install -y libaio
Start again
systemctl start mysqld.service
Set new password
1. Check the initial password ( Remember that this password will be used later )
- cat /var/log/mysqld.log | grep password

2. Log in with the initial password mysql
- mysql -uroot -p

3. Reset password
- SHOW variables LIKE ‘validate_password%’;
- Report errors

- exit sign out mysql Console
- vim /etc/my.cnf

# Add password verification plug-in
plugin-load-add=validate_password.so
# The server loads the plug-in at startup , And prevent the plug-in from being deleted when the server is running
validate-password=FORCE_PLUS_PERMANENT
- restart mysql
systemctl restart mysqld
- Get into mysql
mysql -uroot -p
- Modify the verification strategy to low
set global validate_password_policy=0;
- Change the minimum password length to 1
set global validate_password_length=1;
- Set new password

alter user 'root'@'localhost' identified by 'aaaa';
- After setting, re-enter mysql The server , Enter a new password to log in
exit
mysql -uroot -p
to open up mysql Port of the database , Allow remote connections
1. Check if the firewall is turned off , Close if not
- systemctl status firewalld.service

- Turn off the firewall temporarily
systemctl stop firewalld.service
- Permanently shut down firewall
systemctl disable firewalld.service
2. Set up mysql Remote connection permissions
- mysql -uroot -p
- show databases;
- use mysql;
- select user,host from user;
- update user set host = ‘%’ where user = ‘root’;
% For any access address
- flush privileges;
Refresh the permissions Refresh will not work until the permission is updated
Set up mysql Chinese code
1. Edit profile
- vim /etc/my.cnf

character-set-server=utf8
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
2. restart mysql service
- systemctl restart mysqld
Set up mysql Boot up
1. modify rc.local
- vim /etc/rc.local

service mysqld start
边栏推荐
- MySQL remote connection
- 命令执行(RCE)漏洞
- Canonical engineers are trying to solve the performance problem of Firefox snap
- 剑指 Offer 41. 数据流中的中位数
- lock4j--分布式锁中间件--自定义获取锁失败的逻辑
- Test method learning
- KDD 2022 | 协同过滤中考虑表征对齐和均匀性
- Snowflake ID, distributed unique ID
- npm ERR! fatal: early EOF npm ERR! fatal: index-pack failed
- 一小时构建示例场景 声网发布灵隼物联网云平台
猜你喜欢

Configuration du Flume 4 - source personnalisée + sink
![[software testing] 01 -- software life cycle and software development model](/img/57/a4fcb40a33c80b0bcf2187d1943abd.jpg)
[software testing] 01 -- software life cycle and software development model

以其他组件为代价的性能提升不是好提升

【网络方向实训】-企业园区网络设计-【Had Done】

4-1 port scanning technology

Linux安装MySQL5

3-3主機發現-四層發現

@SneakyThrows注解

How to install and use computer SSD hard disk

How to set a pod to run on a specified node
随机推荐
剑指 Offer 66. 构建乘积数组
7.取消与关闭
3-3主機發現-四層發現
云服务器的安全设置常识
洞见科技作为「唯一」隐私计算数商,「首批」入驻长三角数据要素流通服务平台
Win11 system component cannot be opened? Win11 system widget cannot be opened solution
ArrayList< Integer> Use = = to compare whether the values are equal, and -129=- 129 situation thinking
What about frequent network disconnection of win11 system? Solution to win11 network instability
NLP - GIZA++ 实现词对齐
@SneakyThrows注解
ETCD数据库源码分析——服务端PUT流程
ASP. Net core creates razor page and uploads multiple files (buffer mode) (Continued)
软件测试逻辑覆盖相关理解
k线图经典图解(收藏版)
14.04 million! Sichuan provincial human resources and social security department relational database and middleware software system upgrade procurement bidding!
KDD 2022 | 協同過濾中考慮錶征對齊和均勻性
Dynamics CRM: 本地部署的服务器中, Sandbox, Unzip, VSS, Asynchronous还有Monitor服务的作用
JVM (3) class loading
【U盘检测】为了转移压箱底的资料,买了个2T U盘检测仅仅只有47G~
Flume配置4——自定义Source+Sink
