zoukankan      html  css  js  c++  java
  • Mysql修改密码

    • 安装mysql :
    1. 更新仓库:sudo apt-get update
    2. 安装mysql:sudo apt-get install mysql-server mysql-client -y
    • 无密码登录
    1. sudo mysql -u root -p
    • 修改密码
    1. 输入这句:update mysql.user set plugin=“mysql_native_password” where user=“root”;
    2. 设置root账户密码:update mysql.user set authentication_string=password(‘这里是你的密码’) where user='root’and Host = ‘localhost’;
    • 退出数据库
    1. 输入exit,退出mysql

    • 重启数据库 :sudo service mysql restart

    •  使用自己设置的密码登录:mysql -uroot -p回车,然后提示输入密码
  • 相关阅读:
    继承
    对象与类
    反射
    I/O流
    字符串
    Map的entrySet()方法
    接口与内部类
    Git Usage Summary
    HTML(5)
    毕业设计:下载
  • 原文地址:https://www.cnblogs.com/ssxblog/p/10526086.html
Copyright © 2011-2022 走看看