分区:软件资讯 更新:2023-03-18 10:25:51
1. 前言This article mainly explains two ways to deal with the password forgetting of the root account of relational database. After testing, it can effectively solve the password reset problem of relational database MySQL-password-reset-01.png2. 重置mysql root用户方法1:Step1.停止MySQL服务[root @ zcwyou ~] # kill`cat/var/run/mysqld/Mysqld. PID' or [root @ zcwyou ~] # pkill mysqldStep2.创建一个密码赋值语句的文本文件[root @ zcwyou ~] # vimysql-init alter user' root'@'localhost' by' MyNewPass! 6' Reset the password before loading the authorization table.Step3.使用—init-file选项启动MySQL服务
[root @ zcwyou ~]# mysqld-init-file=MySQL-init-user=MySQLStep4.删除文本文件,使用新密码连接MySQL[root @ zcwyou ~]# RM-f MySQL-init[root @ zcwyou ~]# MySQL-uroot-p ' my new pass!6 'Step5.停止MySQL服务并正常启动[root @ zcwyou ~]# kill ` cat/var/run/mysqld/mysqld . PID `[ root @ zcwyou ~]# system CTL start mysqld MySQL-password-reset-02 . png2. 修改mysql root用户密码之方法2Step1.停止MySQL服务[root @ zcwyou ~]# kill ` cat/var/run/mysqld/mysqld . PID ` 1或者[root @ zcwyou ~]# pkill mysqld MySQL-password-reset-03 . jpgStep2: 启动mysql时,跳过某些选项
Use the-skip-authorization-table-skip-network option to start the relational database service [root @ zcwyou ~]# Mysqld-skip-grant-tables-skip-networking-user=MySQL-skip-grant-tables: Skip authorization table authentication-Skip network: After adding the skip authorization table option, everyone can log in without a password, which is very unsafe. This option does not monitor the network to prevent malicious login.Step3:无密码连接MySQL[root @ zcw] Mysql ALTER user "root" @ "localhost" is created by "MyNewPass! 6'
5.停止MySQL服务并正常启动[root @ zcwyou ~]# kill ` cat/var/run/mysqld/mysqld . PID `[root @ zcwyou ~]# systemctlstartmysqldStep4:破解mysql密码MySQL密码要小心保管。一般情况下,密码不应该重置,应该准备好输入。但是Mysql密码破解技巧应该是每个系统运维工程师必备的技能之一。重置连接mysql数据库的密码。
2024-09-04
抖音商城怎么开通先用后付服务
抖音商城怎么仅退款
抖音商城怎么开通微信支付吗
抖音商城怎么开通要求
2024-09-04
智慧港城app
牡丹直播app安装免费版官网
绿色资源网App下载安装 1.1.7
蜜桃视频传媒网站直接进入