华云数据-云主机重设mysql密码(linux系统)

 时间:2026-02-13 08:10:45

1、linux系统

(1)先结束mysql进程#killallmysqld

用mysql安全模式运行并跳过权限,用root登录,此时不需要密码

#mysqld_safe–skip-grant-tables

#mysql–uroot

2、(2)现在开始重设密码

#mysql>usemysql;

Readingtableinformationforcompletionoftableandcolumnnames

Youcanturnoffthisfeaturetogetaquickerstartupwith–A

Databasechanged

Mysql>upsateusersetPassword=newpasswordwhereuser=‘root’;

QueryOK,2rowsaffected(0.02sec)

Rowsmatched:2Changed:2Warnings:0

Mysql>quit

3、(3)重新启动mysql服务

#servicemysqldrestart


  • 华云数据云主机-mysql 安装
  • 阿里云Linux系统服务器怎样进入mysql?
  • 华云数据云主机-Linux主机连接
  • 阿里云mysql密码设置
  • 企业级虚拟机上搭建CentOS系统
  • 热门搜索
    翻糖蛋糕的做法 百合花怎么养 意大利面怎么做 羊肉馅的做法大全 内分泌失调怎么调理脸上长痘痘 支原体感染怎么引起的 美图秀秀怎么换背景 电脑怎么格式化 中华田园犬为什么禁养 戛怎么读