[root@dyw219 ~]# ssh root@kvm3.deyu.wang root@kvm3.deyu.wang's password: Last login: Sat Jan 25 11:22:15 2020 from 192.168.122.1 [root@kvm3 ~]#
[root@kvm3 ~]# mysql -uroot -pqweqwe Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 20 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)]>
[root@kvm3 ~]# mycli -S /var/lib/mysql/mysql.sock -uroot -pqweqwe mariadb 10.3.11-MariaDB mycli 1.20.1 Chat: https://gitter.im/dbcli/mycli Mail: https://groups.google.com/forum/#!forum/mycli-users Home: http://mycli.net Thanks to the contributor - mrdeathless mariadb root@localhost:(none)>
mariadb root@localhost:(none)> use mysql; You are now connected to database "mysql" as user "root" Time: 0.001s mariadb root@localhost:mysql>
mariadb root@localhost:mysql> show tables; +---------------------------+ | Tables_in_mysql | +---------------------------+ | column_stats | | columns_priv | | db | | event | | func | | general_log | | gtid_slave_pos | | help_category | | help_keyword | | help_relation | | help_topic | | host | | index_stats | | innodb_index_stats | | innodb_table_stats | | plugin | | proc | | procs_priv | | proxies_priv | | roles_mapping | | servers | | slow_log | | table_stats | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | transaction_registry | | user | +---------------------------+
mariadb root@localhost:mysql> select column_name from information_schema.columns where table_name='user'; +------------------------+ | column_name | +------------------------+ | Host | | User | | Password | | Select_priv | | Insert_priv | | Update_priv | | Delete_priv | | Create_priv | | Drop_priv | | Reload_priv | | Shutdown_priv | | Process_priv | | File_priv | | Grant_priv | | References_priv | | Index_priv | | Alter_priv | | Show_db_priv | | Super_priv | | Create_tmp_table_priv | | Lock_tables_priv | | Execute_priv | | Repl_slave_priv | | Repl_client_priv | | Create_view_priv | | Show_view_priv | | Create_routine_priv | | Alter_routine_priv | | Create_user_priv | | Event_priv | | Trigger_priv | | Create_tablespace_priv | | Delete_history_priv | | ssl_type | | ssl_cipher | | x509_issuer | | x509_subject | | max_questions | | max_updates | | max_connections | | max_user_connections | | plugin | | authentication_string | | password_expired | | is_role | | default_role | | max_statement_time | +------------------------+ 47 rows in set Time: 0.035s
mariadb root@localhost:mysql> insert into user (host,user,password,select_priv,i nsert_priv,update_priv) values ('localhost','dywan g',password('123qwe'),'Y','Y','Y'); (1364, "Field 'ssl_cipher' doesn't have a default value")
mariadb root@localhost:(none)> grant select,insert,update on *.* to 'dywang'@'lo calhost' identified by '123qwe'; Query OK, 0 rows affected Time: 0.003s
mariadb root@localhost:(none)> flush privileges; Query OK, 0 rows affected Time: 0.006s