Predefined MySQL Accounts

Two of MySQL's predefined user accounts allow anonymous connections and represent a security risk. Read this sidebar to learn how to delete those connections.

Dustin Puryear

March 29, 2004

1 Min Read
ITPro Today logo in a gray background | ITPro Today

MySQL ships with four predefined accounts: root@localhost, root@%, @%, and @localhost. The MySQL administrative user uses the root@localhost and root@% accounts to create new users, databases, and so forth. The @% and @localhost accounts are used for what MySQL terms anonymous connections. When users don't supply credentials, MySQL uses the anonymous connections to grant access. While you're learning MySQL, you might want to keep these connections active. However, they represent a security risk, so be sure you delete the anonymous connections in a production network. To delete the connections, double-click User Administration in MySQL Control Center (MySQLCC), right-click the @% and @localhost accounts, and click Delete User.

While you're in the User Administration menu, you might also want to change the root user's password, which is blank by default. To do so, right-click the root@local host and root@% accounts, click Edit User, and update the password.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like