zoukankan      html  css  js  c++  java
  • deepin15.11安装MySQL

    1.安装

    这里我们使用apt方式直接安装

    sudo apt-get install -y mysql-server mysql-client

    2.设置密码

    打开终端输入以下命令:

    sudo mysql -uroot -p

    要求输入密码是直接按回车可以直接进入(sudo必须加,不加进不去)。

    如下图:

    成功进入命令行模式以后依次执行下面命令设置密码

    update mysql.user set plugin="mysql_native_password" where user="root";
    grant all on *.* to root@"localhost";
    update mysql.user set authentication_string=password('这里是你的密码') where user='root'and Host = 'localhost';

    flush privileges;

    执行情况如下图:

     

    3.测试 

    然后测试root账户能否使用密码正常登录,输入以下命令

    mysql -uroot -p

    再输入密码即可登录。

     安装成功!

  • 相关阅读:
    大数据
    优化
    gnu
    sed
    hadoop部署
    安装 zookeeper
    ansible
    ssh 配置无密码登录
    未完待续
    解正向代理、反向代理、透明代理
  • 原文地址:https://www.cnblogs.com/Zlcode/p/11475298.html
Copyright © 2011-2022 走看看