【 使用环境 】测试环境
【 OBserver 】
【 使用版本 】
4.2.1.1 and 4.2.0.0
【问题描述】
需要把A集群 OB4.2.0.0 的用户密码信息导入到B集群 OB4.2.1.1,无法通过show create user获取到用户的密码(官方文档里看貌似没有show create user语法,或者有什么其它方法可以把一个OB集群用户密码信息导入到另一个OB集群了?);MySQL5.7.16该语法正常;
obclient [(none)]> show create user root@'%';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'user root@'%'' at line 1
obclient [(none)]>
obclient [(none)]> select @@version;
+------------------------------+
| @@version |
+------------------------------+
| 5.7.25-OceanBase_CE-v4.2.0.0 |
+------------------------------+
1 row in set (0.001 sec)
obclient [(none)]> show create user root@'localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'user root@'localhost'' at line 1
obclient [(none)]>
obclient [(none)]>
obclient [(none)]> show create user root@'127.0.0.1';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'user root@'127.0.0.1'' at line 1
obclient [oceanbase]> show create user root@'%';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'user root@'%'' at line 1
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> select @@version;
+------------------------------+
| @@version |
+------------------------------+
| 5.7.25-OceanBase_CE-v4.2.1.1 |
+------------------------------+
1 row in set (0.001 sec)
show create user root@'localhost';
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER for root@localhost |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*8B425CE6463AA9E355C0E11A4DC9B663ED297669' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
root@127.0.0.1((none)) 10:27:42 >
root@127.0.0.1((none)) 10:27:43 >select @@version;
+------------+
| @@version |
+------------+
| 5.7.16-log |
+------------+
1 row in set (0.00 sec)