mysql mariadb 账户管理备忘

https://blog.csdn.net/qq_40757240/article/details/118068317 < 转>

 

MariaDB [mysql]> update mysql.global_priv set host='%' where user='root';
Query OK, 1 row affected (0.004 sec)
Rows matched: 1 Changed: 1 Warnings: 0

 

MariaDB [(none)]> set password for 'root'@'%' = password('1234');

Query OK, 0 rows affected (0.008 sec)

 

Database changed
MariaDB [mysql]> alter user 'root'@'localhost' identified by '1234';
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'

MariaDB [mysql]> alter user 'root'@'%' identified by '1234';
Query OK, 0 rows affected (0.008 sec)

 

 

(base) rpdzkj@router:~/mariadb_buddles$ cat /etc/odbcinst.ini
[MariaDB ODBC 3.0 Driver]
Description=MariaDB Connector/ODBC v.3.0
Driver=/usr/lib/aarch64-linux-gnu/libmaodbc.so
UsageCount=1

(base) rpdzkj@router:~/mariadb_buddles$ cat /etc/odbc.ini
[MariaDB-server]
Description=MariaDB server
Driver=MariaDB ODBC 3.0 Driver
SERVER=localhost
USER=
PASSWORD=
DATABASE=mysql
PORT=3306

 

 

(base) rpdzkj@router:~/mariadb_buddles$ isql MariaDB-server -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>

posted @ 2024-05-22 11:40  WbnProgress  阅读(5)  评论(0编辑  收藏  举报