5

I have followed the MySQL on Ubuntu 18.04 installation tutorial on Digital Ocean, and during the process of running mysql_secure_installation noticed the following:

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

Question is, how do I access this anonymous user account ? I've installed the database server simply for course. The machine is on LAN, there's no critical data on it, so I understand in production removing anonymous user is desirable but on personal machine for learning it'd be nice just have one simple account to practice SELECTs and JOINS.

1 Answer 1

1

Have them login as test with no password.

To check the existence of such logins, you connect as root into the commandline mysql tool (or some other tool) and run

SHOW GRANTS FOR 'test'@'localhost';
SHOW GRANTS FOR 'test'@'%';

The first will tell you if users can get in from the same machine. The second will say whether you can get in from arbitrary other machines (assuming no network or firewall limitations).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.