mariadb root@localhost:mysql> select host,user,password from user where user='dy wang'; +-----------+--------+-------------------------------------------+ | host | user | password | +-----------+--------+-------------------------------------------+ | localhost | dywang | *050376F3855A67F5E2C6514FD3130B31006C1276 | +-----------+--------+-------------------------------------------+ 1 row in set Time: 0.021s
mariadb root@localhost:(none)> show grants for 'dywang'@'localhost'; +------------------------------------------------------------- | Grants for dywang@localhost +------------------------------------------------------------- | GRANT SELECT, INSERT, UPDATE ON *.* TO 'dywang'@'localhost' +------------------------------------------------------------- -------------------------------------------------------------------+ | -------------------------------------------------------------------+ IDENTIFIED BY PASSWORD '*050376F3855A67F5E2C6514FD3130B31006C1276' | -------------------------------------------------------------------+ 1 row in set Time: 0.026s
mariadb root@localhost:(none)> quit; Goodbye!
[root@kvm3 ~]# mysql -udywang -p123qwe Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 31 Server version: 10.3.11-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
MariaDB [(none)]> exit; Bye