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
create a new user root@'localhost'
mysql> create user 'root'@'%' identified by 'mysql';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'%'
mysql> create user root@'localhost' identified by 'mysql'
-> ;
Query OK, 0 rows affected (0.14 sec)
mysql> grant all privileges on . to root@'localhost';
mysql> flush privileges;
mysql> drop user root@'%';
mysql> flush privileges;
[root@r40 topology]# mysql -uroot -P14000 -hr41 -p
mysql> select host, user from mysql.user;
+-----------+------+
| host | user |
+-----------+------+
| localhost | root |
+-----------+------+
1 row in set (0.01 sec)
### 2. What did you expect to see? (Required)
I logon with the user root@'r41'.
when I check the query select user(), It should show me root@localhost
And after I drop the user root@'%', I shouldn't logon the database from non-tidb server.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v4.0.9
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
after I drop the root@'%', I can still logon tidb by root@'XXX'.
### 1. Minimal reproduce step (Required)
[root@r40 topology]# cat tidb-c1.yaml | grep -C 10 sock
# readpool.storage.use-unified-pool
# You can overwrite this configuration via the instance-level
config
field.server_configs:
tidb:
log.slow-threshold: 300
binlog.enable: false
binlog.ignore-error: false
tikv-client.copr-cache.enable: true
socket: "/tmp/mysql.sock"
tikv:
server.grpc-concurrency: 4
raftstore.apply-pool-size: 2
raftstore.store-pool-size: 2
rocksdb.max-sub-compactions: 1
storage.block-cache.capacity: "16GB"
readpool.unified.max-thread-count: 12
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
raftdb.rate-bytes-per-sec: 0
check the logon user
[root@r40 topology]# mysql -uroot -P14000 -hr41 -e 'select user()'
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
create a new user root@'localhost'
mysql> create user 'root'@'%' identified by 'mysql';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'%'
mysql> create user root@'localhost' identified by 'mysql'
-> ;
Query OK, 0 rows affected (0.14 sec)
mysql> grant all privileges on . to root@'localhost';
mysql> flush privileges;
mysql> drop user root@'%';
mysql> flush privileges;
[root@r40 topology]# mysql -uroot -P14000 -hr41 -p
mysql> select host, user from mysql.user;
+-----------+------+
| host | user |
+-----------+------+
| localhost | root |
+-----------+------+
1 row in set (0.01 sec)
### 2. What did you expect to see? (Required)
I logon with the user root@'r41'.
when I check the query select user(), It should show me root@localhost
And after I drop the user root@'%', I shouldn't logon the database from non-tidb server.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v4.0.9
The text was updated successfully, but these errors were encountered: