用户工具

站点工具


zh:notes:centos_mysql_pwd

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
zh:notes:centos_mysql_pwd [2022/10/22 20:45]
pzczxs [Login MySQL as root without Password]
zh:notes:centos_mysql_pwd [2023/03/23 07:42] (当前版本)
pzczxs [Start mysql Service]
行 1: 行 1:
 ====== Reset the Password of MySQL in the CentOS ====== ====== Reset the Password of MySQL in the CentOS ======
-===== Stop mysql =====+===== Stop mysql Service ​=====
 <code bash> <code bash>
-> systemctl stop mysqld+> systemctl stop mysqld.service
 </​code>​ </​code>​
  
行 12: 行 12:
 ===== Login as root without Password ===== ===== Login as root without Password =====
 <code bash> <code bash>
 +> systemctl start mysqld.service
 > mysql -uroot > mysql -uroot
 </​code>​ </​code>​
行 23: 行 24:
 </​code>​ </​code>​
  
-===== Stop mysql ===== +===== Stop mysql Service and Unset the Environment Option =====
-<code bash> +
-> systemctl stop mysqld +
-</​code>​ +
- +
-===== Unset the MySQL Environment Option =====+
 <code bash> <code bash>
 +> systemctl stop mysqld.service
 > systemctl unset-environment MYSQLD_OPTS > systemctl unset-environment MYSQLD_OPTS
 </​code>​ </​code>​
  
-===== Start mysql =====+===== Start mysql Service ​=====
 <code bash> <code bash>
-> systemctl start mysqld+> systemctl start mysqld.service
 </​code>​ </​code>​
  
zh/notes/centos_mysql_pwd.1666442746.txt.gz · 最后更改: 2022/10/22 20:45 由 pzczxs