当前位置:网站首页>linux下数据库初始化密码
linux下数据库初始化密码
2022-08-04 10:50:00 【影风莫】
- 首先关闭数据库服务
service mysqld stop
- 修改my.cnf文件
执行vim /etc/my.cnf
在mysqld下添加
[mysqld]
skip-grant-tables
- 重启数据库
service mysqld start
- 刷新权限 (这里刷新以防报错,以踩坑!!)
flush privileges;
- 进入mysql
mysql -uroot -p
- 执行
use mysql;
- 修改密码
set password for [email protected] = password('your_password');
- 刷新权限表
flush privileges;
- 退出
quit;
- 删除 skip-grant-tables
- 先关闭服务
service mysqld stop
- 执行
vim /etc/my.cnf进入my.cnf文件
再删除下列这行代码
skip-grant-tables
- 重启mysql
service mysqld start
边栏推荐
- 解决:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING
- There are 12 balls, including 11 weight, only one, don't know is light or heavy. Three times in balance scales, find out the ball.
- RL78开发环境
- 黑马瑞吉外卖之员工账号的禁用和启用以及编辑修改
- Heap Sort
- 怎么禁止textarea拉伸
- Using .NET to simply implement a high-performance clone of Redis (2)
- 北京大学,新迎3位副校长!其中一人为中科院院士!
- 【Inspirational】The importance of review
- 二叉树与堆
猜你喜欢

无代码平台描述文字入门教程

C#/VB.NET:在 Word 中设置文本对齐方式

深度学习100例 —— 卷积神经网络(CNN)天气识别

cubemx stm32 afm3000 module gas flow sensor driver code

HCIP 第十八天

MySQL: Integrity Constraints and Table Design Principles

Oracle中对临时表空间执行shrink操作

Rust 入门指南 (用 WASM 开发第一个 Web 页面)

JUC (1) threads and processes, concurrency and parallelism, thread state, locks, producers and consumers

What is the terminal privilege management
随机推荐
第二批养老理财试点产品发行 一小时销售20亿元
Graphical Hands-on Tutorial--ESP32 One-Key Network Configuration (Smartconfig, Airkiss)
图文手把手教程--ESP32 OTA空中升级(VSCODE+IDF)
CVPR 2022 | 从人体网格预测骨架,是真正的生理学骨架!
Apache Calcite 框架原理入门和生产应用
vscode插件设置——Golang开发环境配置
无代码平台附件上传入门教程
Doing Homework HDU - 1074
Win11怎么重装显卡驱动程序?Win11显卡驱动怎么卸载重装?
《迁移学习导论》第2版,升级内容抢先看!
WPF 截图控件之画笔(八)「仿微信」
二叉树与堆
Business collocations
为企业数字化转型提供服务_数字赋能企业转型
从零开始Blazor Server(7)--使用Furion权限验证
MATLAB程序设计与应用 3.2 矩阵变换
Learn to use the basic interface of set and map
双向带头循环链表实现
Digital management insight into retail and e-commerce operations - retail password
Mobile open source low code tools beeware and kivy