Grant remote access to MySQL

Posted on 01/05/10, in MySQL, by kevin

If you’ve installed MySQL on a machine other than your work station (localhost) and you want to use the MYSQL GUI tools to administer the server then you’ll need to grant remote acccess on the root account (or another account that has useful privileges. This is how to do it.

Connect via SSH and login to mysql…

# mysql -u root -p

// now grant access for the root account
mysql > GRANT USAGE ON *.* to root@'%' IDENTIFIED BY '[password]';
mysql > FLUSH PRIVILEGES;

Change [password] to whatever the password is for the root account and include the single quotes (‘). The % sign means it will accept connections from this account on all IP addresses. You could if you wanted, choose a specific IP here.

You’ll now be able to login remotely.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • DZone
  • email
  • LinkedIn
  • MySpace
  • PDF
  • RSS
  • StumbleUpon
  • Twitter