关于mysql:MYSQL-几个常用命令使用

9次阅读

共计 1022 个字符,预计需要花费 3 分钟才能阅读完成。

一. 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_logfile0“ib_logfile1 重启就好。

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

链接: https://pan.baidu.com/s/14G-b…
提取码: yu27
百度云链接不稳固,随时可能会生效,大家放松保留哈。

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

开源地址
码云地址:
http://github.crmeb.net/u/defu

Github 地址:
http://github.crmeb.net/u/defu

正文完
 0