首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >MYSQL 几个常用命令使用

MYSQL 几个常用命令使用

原创
作者头像
CRMEB商城源码
发布2022-06-01 11:14:29
发布2022-06-01 11:14:29
5650
举报
文章被收录于专栏:crmebcrmeb

一. mysql 修改密码

1.mysql -u root -p root 输入原密码登录命令行

2.use mysql;

3.update user set password=password ('root123') where 'user' = 'root'; 5.7 版本 update user set authentication_string=password ('root123') where 'user' = 'root';

4.flush privileges; 提交应用.

5.You must reset your password using ALTER USER statement before executing this statement 必须修改临时密码,命令:alter user user () identified by '@Juaner521';

二. mysql 修改远程连接

1.mysql -u root -p root

2.use mysql;

3.select host,user,password from user; 查看是否允许远程连接

4.grant all privileges on . to root@'%' identified by "password"; , 如果 报错,可换个方法

#创建一个新的账户

CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'xxxxxx';

#给这个账户所有权限

GRANT ALL PRIVILEGES ON . TO'username'@'%';

1.flush privileges;

三. win 添加 mysql 服务:

  1. 进入 mysql\bin 文件夹:mtsqld --install;
  2. 如果提示:install/remove of the service denide, 以管理员身份运行 cmd。 四。报错 Ignoring the redo log due to missing... : 删除 mysql/data/ 目录下 ib_logfile0ib_logfile1 重启就好。

源码附件已经打包好上传到百度云了,大家自行下载即可~

链接: https://pan.baidu.com/s/14G-bpVthImHD4eosZUNSFA?pwd=yu27

提取码: yu27

百度云链接不稳定,随时可能会失效,大家抓紧保存哈。

如果百度云链接失效了的话,请留言告诉我,我看到后会及时更新~

开源地址

码云地址:

http://github.crmeb.net/u/defu

Github 地址:

http://github.crmeb.net/u/defu

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档