当前位置: 首页 > news >正文

贵州网站推广北京朝阳区

贵州网站推广,北京朝阳区,南宁3及分销网站制作,网站哪家公司做的方法一:通用方法--启动时跳过权限表 1> 停止数据库 以管理员方式打开cmd!! C:\Users\Administrator>net stop mysql MySQL 服务正在停止.. MySQL 服务已成功停止。 2> 启动时跳过权限表 mysqld --console --skip-grant-tables -…

方法一:通用方法--启动时跳过权限表

1> 停止数据库

以管理员方式打开cmd!!

C:\Users\Administrator>net stop mysql

MySQL 服务正在停止..

MySQL 服务已成功停止。

2> 启动时跳过权限表

mysqld --console --skip-grant-tables --shared-memory

C:\Users\Administrator>mysqld --console --skip-grant-tables --shared-memory

注意:不要关闭终端

3> 重开新的终端(再开一个终端),登录并设置新密码

PS C:\Users\Administrator> mysql -uroot -p

Enter password: 直接敲回车键

mysql> flush privileges;

mysql> alter user root@localhost identified by '123456'; //重置密码

4> 退出MySQL,关闭第一个终端,正常启动服务。

mysql> \q

PS C:\Users\Administrator> net start mysql

MySQL 服务正在启动 ..

MySQL 服务已经启动成功。

PS C:\Users\Administrator> mysql -uroot -p123456

mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 8

Server version: 8.0.36 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> \q

Bye

方法二:参考官方文档

1> 停止服务

PS C:\Users\Administrator> net stop mysql

MySQL 服务正在停止.

MySQL 服务已成功停止。

2> 创建一个文本文件到mysql文件夹里,保存为 mysql_init.txt ,内容如下:

ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

3> 启动同时使用上一步文件修改密码

要求管理员身份打开cmd来运行命令,暂时不要关闭终端:

C:\Users\Administrator>mysqld --init-file= F:\mysql\mysql-8.0.36-winx64\mysql_init.txt

(具体路径复制粘贴)

4> 打开另一个终端,登录测试

PS C:\Users\Administrator> mysql -uroot -p123456

mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 9

Server version: 8.0.36 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> \q

Bye

5> 关闭第一个终端,正常启动服务。

C:\Users\Administrator>net start mysql

MySQL 服务正在启动 ..

MySQL 服务已经启动成功。

C:\Users\Administrator>mysql -uroot -p123456

mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 8

Server version: 8.0.36 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> \q

Bye

6> 删除文件 mysql_init.txt

http://www.hengruixuexiao.com/news/16117.html

相关文章:

  • 网站建设倒计时代码杭州排名优化公司电话
  • 佛山外贸网站建设效果免费网站建设seo
  • 定西市建设局网站快排seo
  • 肇庆企业建站程序优化生育政策
  • 2017织梦网站怎么做seo直销怎么做才最快成功
  • 全景网站开发待遇电商运营推广
  • 天水地区建网站网络开发
  • wordpress bizhongbio手机清理优化软件排名
  • 农业网站建设模板百度搜索网页
  • 网站建设阶段制作网站的公司有哪些
  • 百度收录需要多久单页面seo搜索引擎优化
  • 金华做网站的公司苏州seo
  • 五华网站建设 优帮云怎么建网站平台卖东西
  • 网站自适应代码黄页推广
  • 成都网站建设公司有哪些seo优化前景
  • 成都电商设计招聘网站seo排名优化服务
  • 做网站钱老域名
  • 怎么制作图片模板天津优化公司哪家好
  • 网站制作公司 云南杭州seo俱乐部
  • 五百亿建站模板b站推广网站2024mmm
  • 不知此网站做男人也摘抄一则新闻
  • 做网站哪家强购物网站有哪些
  • 网站建设时间查询惠州seo全网营销
  • 网站建设及相关流程百度在线客服中心
  • 网站建设要不要工商注册广州最新疫情最新消息
  • 能免费创建网站吗网络舆情
  • 微信网页版下载安装广州网站优化推广
  • wap网站自动俄罗斯网络攻击数量增长了80%
  • 怎么做网站调查表培训学校招生方案范文
  • 福田网站制作电商软文广告经典案例