admin@ubuntu:~$ mysql -h10.18.18.126 -P2883 -uroot@proxysys -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1680615140
Server version: 5.6.25
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> quit
Bye
admin@ubuntu:~$ obclient -h10.18.18.126 -P2883 -uroot@proxysys -p
Enter password:
ERROR 2027 (HY000): received malformed packet
admin@ubuntu:~$
mysql client可以登录,但是obclient不可以。
admin@ubuntu:~$ obclient --version
obclient Ver Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1
admin@ubuntu:~$ mysql -uroot@proxysys -p -h127.0.0.1 -P2883
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1680634025
Server version: 5.6.25
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> status
--------------
mysql Ver 8.0.36-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
Connection id: 1680634025
ERROR 2027 (HY000): Malformed packet
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.6.25
Protocol version: 10
Connection: 127.0.0.1 via TCP/IP
ERROR 2027 (HY000): Malformed packet
Client characterset: utf8mb4
Server characterset: utf8mb4
TCP port: 2883
Binary data as: Hexadecimal
--------------
mysql> show databases;
+--------------------------+-------------------+
| Variable_name | Value |
+--------------------------+-------------------+
| tx_isolation | READ-COMMITTED |
| system_time_zone | +08:00 |
| time_zone | +08:00 |
| character_set_server | utf8mb4 |
| character_set_client | utf8mb4 |
| interactive_timeout | 28800 |
| query_cache_size | 1048576 |
| character_set_results | utf8mb4 |
| max_allowed_packet | 4194304 |
| sql_mode | STRICT_ALL_TABLES |
| net_buffer_length | 16384 |
| wait_timeout | 28800 |
| lower_case_table_names | 2 |
| query_cache_type | OFF |
| init_connect | |
| transaction_isolation | READ |
| character_set_connection | utf8mb4 |
| net_write_timeout | 60 |
+--------------------------+-------------------+
18 rows in set (0.00 sec)
mysql>