How to change root@localhost password or delete user

47 views
Skip to first unread message

Ab. Sh.

unread,
Jun 28, 2022, 4:57:53 PM6/28/22
to Google Cloud SQL discuss
We have a mysql v5.7 instance. Which got compromised (Ransomware), Attacker delete databases and left one saying where to send money.

Anyway, The logins we found were using admin or root which were having default setting.

We deleted root and admin, including all older users, and created new users with different names. When I list users from GCP Console I seen only newly created users, while listing users through mysql shell I see an addition user (system user): root@localhost.

All GCP created users are regular user. So deleting or changing root@localhost fails.

Is it secure? Is there a way to change or remove it? Does GCP Console provide a way to create "system user"?

I have another instance which does not have root user!
  

Andres Marquez Rodriguez

unread,
Jun 29, 2022, 6:17:32 PM6/29/22
to Google Cloud SQL discuss

Unfortunately, it is not possible to delete ‘root@localhost’ or modify it, according to [1].

[1] https://cloud.google.com/sql/docs/mysql/users#system_users

Reply all
Reply to author
Forward
0 new messages