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]> 
  • 相关阅读:
    [BZOJ1415]聪聪和可可
    [POJ2096]Collecting Bugs
    开博第一天
    实现CSS样式垂直水平完全居中
    Vue中独立组件之间数据交互
    python Template中substitute()的使用
    eclipse 编辑 python 中文乱码的解决方案
    java Math.random()随机数的产生
    java文件读写的两种方式
    My way on Linux
  • 原文地址:https://www.cnblogs.com/hui-shao/p/mysqladmin.html
Copyright © 2011-2022 走看看