当前位置:网站首页>Centso8 installing mysql8.0 (Part 2)
Centso8 installing mysql8.0 (Part 2)
2022-06-12 08:27:00 【Dyansts】
Take on the above
4 Check the password , Sign in MySQL, Change Password , Set up remote access user groups , to open up 3306 port .
4.1 View default password
cat /var/log/mysqld.log | grep password A temporary password is generated for [email protected]: W?pd%*8k<xeI
among
W?pd%*8k<xeI
Is the password
4.2 Sign in MySQL
mysql -uroot -p4.3 Change Password
adopt ALTER Change the default password to 'root'
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
//
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'A';
A It's the password you want to set ,MySQL Has its own password specification . You can view it on the official website , You can also search directly .4.4 Set up remote access user groups
mysql> create user 'root'@'%' identified with mysql_native_password by 'root';
// You can set your own password , The show is root
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on *.* to 'root'@'%' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
4.5 Open ports
sign out MySQL
exit4.5.1iptables Open port of
[[email protected] ~]# vim /etc/sysconfig/iptables
========================================================================
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
// Added 3306 port
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8090 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
========================================================================
[[email protected] ~]# systemctl restart iptables.service
[[email protected] ~]# systemctl enable iptables.service4.5.2 firewalld
Can pass Navicat 15 for MySQL Remote access
边栏推荐
- Asp Net project add log function
- Configuration and principle of MSTP
- Hands on deep learning -- implementation of multi-layer perceptron from scratch and its concise implementation
- (P15-P16)对模板右尖括号的优化、函数模板的默认模板参数
- MATLAB image processing - Otsu threshold segmentation (with code)
- 余压监控系统保证火灾发生时消防疏散通道的通畅,为大型高层建筑的安全运行和人民生命财产安全保驾护航
- Model Trick | CVPR 2022 Oral - Stochastic Backpropagation A Memory Efficient Strategy
- Ankerui fire emergency lighting and evacuation indication system
- MES helps enterprises to transform intelligently and improve the transparency of enterprise production
- Callback webrtc underlying logs to the application layer
猜你喜欢

MES帮助企业智能化改造,提高企业生产透明度

ASP. Net project development practice introduction_ Item VI_ Error report (summary of difficult problems when writing the project)

(p27-p32) callable object, callable object wrapper, callable object binder

ctfshow web3

【动态内存管理】malloc&calloc和realloc和笔试题和柔性数组

MPLS的原理与配置

Hands on learning and deep learning -- simple implementation of linear regression

Scope of bean

企业为什么要实施MES?具体操作流程有哪些?

(p36-p39) right value and right value reference, role and use of right value reference, derivation of undetermined reference type, and transfer of right value reference
随机推荐
vm虚拟机中使用NAT模式特别说明
Only use MES as a tool? Looks like you missed the most important thing
Record the first step pit of date type
超全MES系统知识普及,必读此文
【新规划】
(P33-P35)lambda表达式语法,lambda表达式注意事项,lambda表达式本质
MYSQL中的锁的机制
FDA reviewers say Moderna covid vaccine is safe and effective for children under 5 years of age
Error: what if the folder cannot be deleted when it is opened in another program
MYSQL中的查询
Callback webrtc underlying logs to the application layer
Model Trick | CVPR 2022 Oral - Stochastic Backpropagation A Memory Efficient Strategy
Detailed explanation of private, public and interface attributes in cmake
Principle and configuration of MPLS
(p40-p41) transfer and forward perfect forwarding of move resources
Learning notes (1): live broadcast by Dr. Lu Qi - face up to challenges and grasp entrepreneurial innovation opportunities - face up to challenges and grasp entrepreneurial innovation opportunities -1
(p15-p16) optimization of the right angle bracket of the template and the default template parameters of the function template
Database foundation -- normalization and relational schema
Py & go programming skills: logic control to avoid if else
(P15-P16)对模板右尖括号的优化、函数模板的默认模板参数
https://blog.csdn.net/rj2012001/article/details/121783690