likes
comments
collection
share

MYSQL 几个常用命令使用

作者站长头像
站长
· 阅读数 23

一. 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 root2.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