You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i connect to shardingsphere-proxy:
mysql -uroot -proot -P3307 -h127.0.0.1
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 65
Server version: 5.7.33-log-ShardingSphere-Proxy 5.0.0-beta
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> select id,name,@@PORT from testdb.t1;
ERROR 1046 (3D000): No database selected
MySQL [(none)]> use testdb;
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
MySQL [testdb]> use testdb;
Database changed
MySQL [testdb]> select id,name,@@PORT from testdb.t1;
+----+--------+--------+
| id | name | @@PORT |
+----+--------+--------+
| 1 | mm | 3318 |
| 2 | gg | 3318 |
| 3 | niuniu | 3318 |
| 4 | hhhh | 3318 |
| 5 | DBR920 | 3318 |
| 6 | 3316 | 3318 |
+----+--------+--------+
6 rows in set (0.01 sec)
But when I connect directly to the back-end database:
mysql -uroot -proot -P3316 -h127.0.0.1
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 512125
Server version: 5.7.33-log MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> select * from testdb.t1;
+----+--------+
| id | name |
+----+--------+
| 1 | mm |
| 2 | gg |
| 3 | niuniu |
| 4 | hhhh |
| 5 | DBR920 |
| 6 | 3316 |
+----+--------+
6 rows in set (0.00 sec)
I don't need use database! Is there any way for shardingsphere-proxy to realize this function?
The text was updated successfully, but these errors were encountered:
hi there, today someone from the community ask the same issue. so I try the up to date cocde (code pulled in 2021-08-18), and the no database selected issue still exist
When i connect to shardingsphere-proxy:
mysql -uroot -proot -P3307 -h127.0.0.1
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 65
Server version: 5.7.33-log-ShardingSphere-Proxy 5.0.0-beta
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> select id,name,@@PORT from testdb.t1;
ERROR 1046 (3D000): No database selected
MySQL [(none)]> use testdb;
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
MySQL [testdb]> use testdb;
Database changed
MySQL [testdb]> select id,name,@@PORT from testdb.t1;
+----+--------+--------+
| id | name | @@PORT |
+----+--------+--------+
| 1 | mm | 3318 |
| 2 | gg | 3318 |
| 3 | niuniu | 3318 |
| 4 | hhhh | 3318 |
| 5 | DBR920 | 3318 |
| 6 | 3316 | 3318 |
+----+--------+--------+
6 rows in set (0.01 sec)
But when I connect directly to the back-end database:
mysql -uroot -proot -P3316 -h127.0.0.1
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 512125
Server version: 5.7.33-log MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> select * from testdb.t1;
+----+--------+
| id | name |
+----+--------+
| 1 | mm |
| 2 | gg |
| 3 | niuniu |
| 4 | hhhh |
| 5 | DBR920 |
| 6 | 3316 |
+----+--------+
6 rows in set (0.00 sec)
I don't need use database! Is there any way for shardingsphere-proxy to realize this function?
The text was updated successfully, but these errors were encountered: