I have a Mysql instance installed (not as a service) on a WinXP virtual machine (VirtualBox). I installed it from the installer with GUI on the MySql site. Everything works perfectly, but the MySql connection refuses external connections. What are the simplest steps to be able to connect to this MySql instance from outside? I use a user called 'root'...

3 Answers 3


You have to explicitly grant access from external hosts to the user


it is generally best not to use root externally


I think the default root user only has access on the local machine. This offers some sort of protection since the 'root' account in many cases has no password by default. Only users who can access the machine can administer as root (by default).

You need to create another user who can access MySql remotely. See the Adding Users page for more details on this. It is well explained there.

Note that you should be logged into Windows and MySql running.
If you will wish to access MySql when you are logged out, then you will need to install it as a service.


Using @Adam and @codinguser's answers, and assuming that VirtualBox host is

GRANT ALL PRIVILEGES ON *.* TO 'root'@'' with grant option;


  1. Assuming the machine (or virtual machine) is not accessible from the outside, you can use root with no problems.
  2. It helps if the DB has NO vulnerable/interesting data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .