zoukankan      html  css  js  c++  java
  • 更改数据库登陆密码




    登陆数据库,进入mysql数据库:


    MariaDB [(none)]> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [mysql]>
    查看mysql数据库中user表: MariaDB
    [mysql]> select user,host,password from user; +------+-----------+-------------------------------------------+ | user | host | password | +------+-----------+-------------------------------------------+ | root | localhost | *E56A114692FE0DE073F9A1DD68A00EEB9703F3F1 | +------+-----------+-------------------------------------------+ 1 row in set (0.00 sec)
    更新user表中用户root对应的password字段: MariaDB
    [mysql]> update user set password=password('123123') where user='root'; Query OK, 0 rows affected (0.02 sec) Rows matched: 1 Changed: 0 Warnings: 0 MariaDB [mysql]> select user,host,password from user; +------+-----------+-------------------------------------------+ | user | host | password | +------+-----------+-------------------------------------------+ | root | localhost | *E56A114692FE0DE073F9A1DD68A00EEB9703F3F1 | +------+-----------+-------------------------------------------+ 1 row in set (0.00 sec)
    刷新权限:
    MariaDB [(none)]> flush privileges;
    Query OK, 0 rows affected (0.00 sec)
    
    
    
    MariaDB [mysql]> 
  • 相关阅读:
    day_03、初识函数
    一、Python简介
    四、列表和元祖
    MinGW安装和使用
    python编码总结
    开博第一篇,学习markdown
    python 2.7.11安装pywin32过程中 停止工作问题
    python读写excel
    关于\r和\n的区别
    1.1 Python for macOS 安装与配置
  • 原文地址:https://www.cnblogs.com/hui-shao/p/mysqladmin.html
Copyright © 2011-2022 走看看