当前位置:网站首页>linux-mysql-命令
linux-mysql-命令
2022-06-21 17:59:00 【信仰_273993243】
1、mysql在linux下查看my.cnf位置的方法
locate my.cnf
2、启动、重启、关闭命令
1、重启:
systemctl restart mysqld
2、停止
systemctl stop mysqld
3、在启动
service mysqld start
二、忘记密码需要修改mysql密码操作:
先把密码验证关闭,进入mysql,然后再修改root账号的密码,在把密码验证打开
先修改:
1、修改/etc/my.cnf配置文件
vi /etc/my.cnf
2、在[mysqld]项下添加skip-grant-tables,保存即可。
登录:
1、mysql -u root -p
2、不用输入密码,直接回车(出现Enter Password 也一样直接回车,即可登陆成功)
3、更改密码
update user set authentication_string=password(‘新密码’) where user=‘root’;
flush privileges;
退出:
quit;
回到 /etc/my.cnf 文件,找到[mysqld]、将其后面添加的 skip-grant-tables 删除或者直接注释掉。
重启mysql:先重启,在停止,在执行启动命令
边栏推荐
- GOF mode-03-behavioral mode (bottom)
- 11 introduction and installation of beautiful soup parsing library
- 2022年6月25日PMP考试通关宝典-3
- 36 krypton launched | focusing on the innovation of health insurance products, and "Yingshi health" has obtained four rounds of financing
- Is there a Hongmeng version of the song ordering system? Lao Wang was the first to experience it
- Two problems that may occur in the use of ThreadLocal and thread pool
- 【面试高频题】难度 1.5/5,经典「前缀和 + 二分」运用题
- R语言使用plyr包的rbind.fill函数纵向合并两个数据列不同的dataframe数据
- 力扣今日题1108. IP 地址无效化
- Yolov5 trains its own data set to report error records
猜你喜欢

JDBC notes

Huawei launches new products again? These models have excellent functions
Must the database primary key be self incremented? What scenarios do not suggest self augmentation?

Cookies and sessions

蚂蚁集团自研TEE技术通过国家级金融科技产品认证 47项检测均达要求

Nebula Graph入驻阿里云计算巢,助力企业打造云上超大规模图数据库

Cache design issues

vivo 容器集群监控系统架构与实践

GOF mode-03-behavioral mode (bottom)

Post Gartner webinar "nine questions on digital transformation"
随机推荐
Servlet learning (II)
GetEmptyBlcoksPre Info
系统集成项目管理工程师(软考中级)怎么备考?
2022年下半年传统产品经理国际资格认证招生简章(NPDP)
2022年下半年深圳地区数据分析师认证(CPDA),[进入查看]
品牌、产品和服务齐发力,东风日产接下来有什么新动作?
鸿蒙之后,华为宣布再将捐赠欧拉,鸿蒙和欧拉的捐赠预计将给业界带来哪些影响?
C. Helping the Nature(cf)差分
jvm造轮子
【一起上水硕系列】Day One
11 brève introduction et installation de la Bibliothèque d'analyse de soup beautiful
GOF mode-03-behavioral mode (bottom)
近年区域赛(20-22)
JDBC notes
The main data products of China's two Fengyun meteorological "new stars" will be open and shared with global users
Image classification, AI and automatic performance test
mocklog_模拟日志
Two problems that may occur in the use of ThreadLocal and thread pool
36氪首发 | 聚焦健康险产品创新,「英仕健康」已获4轮融资
After Hongmeng, Huawei announced that it would donate to Euler again. What impact is expected to be brought to the industry by the donations of Hongmeng and Euler?