当前位置:网站首页>如何开发直播软件,ubuntu使用mysql密码忘记怎么办
如何开发直播软件,ubuntu使用mysql密码忘记怎么办
2022-08-05 22:43:00 【云豹网络科技】
如何开发直播软件,ubuntu使用mysql密码忘记怎么办
方法一:
1):编辑mysqld.cnf文件
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
2):在文件中的skip-external-locking一行的下面添加一行:
skip-grant-tables
3):重启MySQL服务
sudo service mysql restart
4):终端输入mysql进入MySQL,输入USE mysql切换至mysql数据库
mysql
USE mysql
5):把root用户的密码修改为000000
UPDATE mysql.user SET authentication_string=password(‘000000′) WHERE User=’root’ AND Host =’localhost’;
6):修改字段plugin
UPDATE user SET plugin=”mysql_native_password”;
7):
flush privileges;
8):退出
quit;
9):注释掉/etc/mysql/mysql.conf.d/mysqld.cnf文件中添加的一行
方法二:利用mysql自带的用户debian-sys-maint进行重置密码,只有Debian或Ubuntu服务器才有,存在于/etc/mysql/debian.cnf文件中
1):打开/etc/mysql/目录下的debian.cnf文件,里面包括用户名和密码
sudo vim /etc/mysql/debian.cnf
2):使用文件中提供的用户名和密码进入mysql
mysql -u debian-sys-maint -p
3):选择mysql数据库
use mysql;
4):更新root用户的密码为123456
update user set authentication_string=password(‘123456′) where user=’root’;
以上就是 如何开发直播软件,ubuntu使用mysql密码忘记怎么办,更多内容欢迎关注之后的文章
边栏推荐
猜你喜欢
随机推荐
60: Chapter 5: Develop admin management services: 13: Develop new functions of [Add/Modify Friendship Links, Interfaces]; (Add data to MongoDB) (To operate the Dao layer interface of MongoDB, you must
Redies(四) session共享的优化
On how to download m3u8/ts videos in web pages
物联网如何推动农业发展
[debian]cockpit error Cannot refresh cache whilst offline
[esp32] esp8266 connects to Xiao Ai to control the relay
家具行业APS解决方案
Bubble Sort (mercifully Sort)
CAN-Oe channel configuration method
国内BLDC电机控制方案目前存在什么痛点?
橡胶制造业APS解决方案
Interpretation of APS and its benefits
[Raspberry Pi] Install OpenWrt on Raspberry Pi
印刷行业APS解决方案
[GKCTF 2021]easycms
2022-8-5 第六组 ptz 集合与树
Analysis of six methods of declaring variables in ES6
将trivydb转转化为mysql、sqlite的小工具
LINQ学习之旅 C#3.0新特性(一)
如何优雅的消除系统重复代码









