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
CREATEUSER 'pmm'@'%' IDENTIFIED BY 'pass';
GRANTSELECT, PROCESS, REPLICATION CLIENT ON*.* TO 'pmm'@'%';
ALTERUSER'pmm'@'%' WITH MAX_USER_CONNECTIONS 10;
GRANTSELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'pmm'@'%';
The problem is, running this script on an AWS RDS MySQL 8 database "aggressively" doesn't work. It closed my client connection after complaining about an invalid GRANT. It then blocked the replication process of our replica, failing on the GRANT instructions (Context: we are migrating our Primary from 5.7 to 8.0.x so our 8.0.x replica failed quite hard).
After a chat with GPT, it explained that in MySQL 8 the default authentication method changed and that running this script instead would work,
-- Create user with caching_sha2_password authentication pluginCREATEUSER 'pmm'@'%' IDENTIFIED WITH 'caching_sha2_password' BY 'pass';
-- Grant necessary privileges using the new syntaxGRANTSELECT, PROCESS, REPLICATION CLIENT ON*.* TO 'pmm'@'%';
GRANTSELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'pmm'@'%';
-- Set maximum user connectionsALTERUSER'pmm'@'%' WITH MAX_USER_CONNECTIONS 10;
I tried it and indeed it seems to work.
I'm not expert here on the why and how; we should probably use the mysql_native_password plugin instead, I don't know. But I know that the current instructions in the documentation were very harmful for us.
Thanks !
The text was updated successfully, but these errors were encountered:
fredericgboutin-yapla
changed the title
PMM user creation instructions for MySQL 8 on Amazon RDS don't work
PMM user creation instructions for MySQL 8 on Amazon RDS don't work and are harmful
Feb 14, 2024
When reading https://docs.percona.com/percona-monitoring-and-management/setting-up/client/aws.html#setting-up-the-amazon-rds-db-instance you see,
The problem is, running this script on an AWS RDS MySQL 8 database "aggressively" doesn't work. It closed my client connection after complaining about an invalid
GRANT
. It then blocked the replication process of our replica, failing on theGRANT
instructions (Context: we are migrating our Primary from 5.7 to 8.0.x so our 8.0.x replica failed quite hard).After a chat with GPT, it explained that in MySQL 8 the default authentication method changed and that running this script instead would work,
I tried it and indeed it seems to work.
I'm not expert here on the why and how; we should probably use the
mysql_native_password
plugin instead, I don't know. But I know that the current instructions in the documentation were very harmful for us.Thanks !
The text was updated successfully, but these errors were encountered: