1. Change the password
MySQL default is no password, can be modified in the following ways:
mysql> use MySQL;
mysql> Update user Set Password=password (' new_passwd ') where name= ' name ';
mysql> flush Privileges;
Sudo/etc/init.d/mysql restart
Where new_passwd is the new password, name is the user name to be modified
2. Remote Access
Just installed MySQL should be only native login operation, in order to remote access needs to make some changes:
mysql> use MySQL;
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' passwd ' with GRANT option;
Mysql>flush privileges;
mysql>exit;
The GRANT statement here is to give the root user all the permissions to operate the database anywhere, passwd is the password, and of course can only open a subset of the rights as needed.
But to this step may still be unsuccessful, this time check/etc/mysql/my.cnf, see if it opens bind-address = 127.0.0.1, if any, comment out this line or change to 0.0.0.0.
Then sudo/etc/init.d/mysql restart, it should be possible to access from the remote.
MySQL related issues