Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change password for user polardbx_root #103

Open
yejr opened this issue Nov 30, 2022 · 1 comment
Open

How to change password for user polardbx_root #103

yejr opened this issue Nov 30, 2022 · 1 comment

Comments

@yejr
Copy link

yejr commented Nov 30, 2022

mysql>select user();
+--------------------------+
| USER()                   |
+--------------------------+
| polardbx_root@172.17.0.1 |
+--------------------------+
1 row in set (0.00 sec)

mysql>select current_user();
+----------------+
| current_user() |
+----------------+
| d1@pxc-tryout  |
+----------------+
1 row in set (0.01 sec)

mysql>set password for current_user() = password('pXVwPKGrG');
ERROR 3009 (HY000): [154bfae7a9c01000][172.17.0.5:54645][d1]syntax error, error in :'password for current_user() = password('pXV', expect =, actual (, pos 30, line 1, column 30, token (

mysql>SET PASSWORD FOR 'polardbx_root'@'pxc-tryout' = PASSWORD('654321');
ERROR 3009 (HY000): [154bfb2645801000][172.17.0.5:54645][d1]Illegal host: pxc-tryout

mysql>SET PASSWORD FOR 'polardbx_root'@'%' = PASSWORD('654321');
ERROR 5107 (HY000): [154bfb2f25801000][172.17.0.5:54645][d1]ERR-CODE: [PXC-5107][ERR_OPERATION_NOT_ALLOWED] Can not modify polardbx_root since it is reserved for system
@F-ca7
Copy link
Collaborator

F-ca7 commented Nov 30, 2022

https://github.com/ApsaraDB/galaxysql/blob/aac20161d8980cf3c5e6d2d1e1c1bb098db26352/polardbx-server/src/main/java/com/alibaba/polardbx/server/handler/privileges/polar/PolarHandlerCommon.java#L143

Cannot modify polardbx_root is by design. polardbx_root is a built-in root account, which should not be used by users or applications.

I suggest that you create a new account to access PolarDB-X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants