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.
March 29, 2004
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.
About the Author
You May Also Like