Resources

Managed MySQL users and permissions

Every Managed MySQL service has an admin user, upadmin by default. You can add more users in the Control Panel, through the API, or with SQL. How you create a user decides which privileges it starts with.

The admin user

upadmin can create databases and users, and grant privileges to other users. It can read the mysql and sys system schemas but can't change them.

GRANT ALL PRIVILEGES ON *.* is not supported. Grant specific privileges instead, or all privileges on a single database.

Privileges of new users

Created inStarting privileges
Control Panel or APIThe same privileges as upadmin, including creating users and granting privileges
SQL (CREATE USER)None

To create users with limited access, or to restrict a user you created in the Control Panel, see How to restrict user access in Managed MySQL. The Control Panel and API don't have privilege settings for MySQL users.

Users you create with SQL appear in the Control Panel user list shortly after you create them, marked Managed by user instead of showing a password. Changing a user's password in the Control Panel or API doesn't change its privileges.

Connecting as another user

The connection details in the Control Panel are for upadmin and use defaultdb as the database. To connect as another user, replace the username, password and database name. A user without access to defaultdb can't connect with it.

Before you restrict or delete a user

  • Views: a view runs with the privileges of the user that created it, and stops working if that user loses its privileges or is deleted. Deleting a user in the Control Panel or API doesn't check whether it created any views. Recreate such views as upadmin first.
  • Open connections: connections that are already open keep the user's previous privileges until they reconnect. To close them, use Terminate connection in the Connections tab of the Control Panel.

MySQL is a registered trademark of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Can't find what you're looking for?

For more help you can contact our awesome 24/7 support team