当前位置:网站首页>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
边栏推荐
- Where is the win11 installation permission set? Win11 installation permission setting method
- 凌云出海记 | 文华在线&华为云:打造非洲智慧教学新方案
- Understanding of software test logic coverage
- Koa 源码剖析
- Kdd 2022 | prise en compte de l'alignement et de l'uniformité des représentations dans le Filtrage collaboratif
- JVM(4) 字節碼技術+運行期優化
- 一个mysql里有3306端口下,一个mysql有20多个数据库,怎么一键备份20多个数据库,做系统备份,防止数据误删除?
- 童年经典蓝精灵之百变蓝爸爸数字藏品中奖名单公布
- 一次 Keepalived 高可用的事故,让我重学了一遍它!
- JVM(4) 字节码技术+运行期优化
猜你喜欢
What about frequent network disconnection of win11 system? Solution to win11 network instability
Exploration and practice of NLP problem modeling scheme
Canonical engineers are trying to solve the performance problem of Firefox snap
洞见科技作为「唯一」隐私计算数商,「首批」入驻长三角数据要素流通服务平台
JVM(4) 字节码技术+运行期优化
idea中方法上没有小绿色三角
Game maker Foundation presents: Valley of belonging
Flume配置3——拦截器过滤
文件包含漏洞
Deficiencies and optimization schemes in Dao
随机推荐
Go: how to write a correct UDP server
There are more than 20 databases in a MySQL with 3306 ports. How can I backup more than 20 databases with one click and do system backup to prevent data from being deleted by mistake?
JVM(2) 垃圾回收
Automatically obtain local connection and network address modification
How is the combination of convolution and transformer optimal?
There is no small green triangle on the method in idea
4-2 port banner information acquisition
MBA-day19 如果p则q矛盾关系p 且非q
How to solve the problem of insufficient memory space in Apple iPhone upgrade system?
[USB flash disk test] in order to transfer the data at the bottom of the pressure box, I bought a 2T USB flash disk, and the test result is only 47g~
Kdd 2022 | prise en compte de l'alignement et de l'uniformité des représentations dans le Filtrage collaboratif
Sword finger offer 59 - ii Maximum value of the queue
In 2022, the financial interest rate has dropped, so how to choose financial products?
云服务器的安全设置常识
JVM(4) 字节码技术+运行期优化
Static static member variables use @value injection
一个mysql里有3306端口下,一个mysql有20多个数据库,怎么一键备份20多个数据库,做系统备份,防止数据误删除?
以其他组件为代价的性能提升不是好提升
Sophomore majoring in software engineering, the previous learning situation is not very good. How to plan the follow-up development route
Zotero期刊自動匹配更新影響因子