当前位置:网站首页>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
边栏推荐
- APS软件有哪些排程规则?有何异常处理方案?
- 智能制造的时代,企业如何进行数字化转型
- Vision Transformer | Arxiv 2205 - TRT-ViT 面向 TensorRT 的 Vision Transformer
- Triggers in MySQL
- Is it really expensive for enterprises to launch MES software?
- Scope of bean
- 【动态内存管理】malloc&calloc和realloc和笔试题和柔性数组
- Query in MySQL
- Ankerui motor protector has the functions of overload inverse time limit, overload definite time limit, grounding, starting timeout, leakage, underload, phase failure, locked rotor, etc
- In the era of intelligent manufacturing, how do enterprises carry out digital transformation
猜你喜欢

Error: clear the history in the search box in the website?

Ankerui fire emergency lighting and evacuation indication system

ctfshow web3

数据库基础——规范化、关系模式

Installation series of ROS system (I): installation steps

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

FDA reviewers say Moderna covid vaccine is safe and effective for children under 5 years of age

(p40-p41) transfer and forward perfect forwarding of move resources

Hands on learning and deep learning -- Realization of linear regression from scratch

Figure neural network makes Google maps more intelligent
随机推荐
Hands on deep learning -- discarding method and its code implementation
(P33-P35)lambda表达式语法,lambda表达式注意事项,lambda表达式本质
(P13)final关键字的使用
(P14) use of the override keyword
(P19-P20)委托构造函数(代理构造函数)和继承构造函数(使用using)
JVM learning notes: three local method interfaces and execution engines
(p25-p26) three details of non range based for loop and range based for loop
MYSQL中的锁的机制
APS软件有哪些排程规则?有何异常处理方案?
In depth interpretation of 5g key technologies
CMAKE 里PRIVATE、PUBLIC、INTERFACE属性示例详解
visual studio2019的asp.net项目添加日志功能
JVM学习笔记:三 本地方法接口、执行引擎
三国杀周边--------猪国杀题解
Error: what if the folder cannot be deleted when it is opened in another program
Figure neural network makes Google maps more intelligent
Strvec class mobile copy
Vscade debug TS
Model Trick | CVPR 2022 Oral - Stochastic Backpropagation A Memory Efficient Strategy
记Date类型的一次踩坑
https://blog.csdn.net/rj2012001/article/details/121783690