Home > Uncategorized > Quick Primer: MySQL: remote administrative user

Quick Primer: MySQL: remote administrative user

Log on from CLI in linux

mysql -p

list databases

mysql> show databases;

Set a password for a (remote) user

mysql> use mysql;
mysql> show tables;
mysql> select user, password from user;
mysql> select password('password_to_be_hashed');
mysql> GRANT ALL ON *.* TO 'remote_administrative_user'@'192.168.100.%' IDENTIFIED BY PASSWORD '[password hash returned in the last query]' WITH GRANT OPTION;
mysql> Flush privileges;

% is a wildcard, the host definition can be just ‘%’

You can then use remote_administrative_user to logon using remote administrative tools.  You may want to scale back permissions (review GRANT).

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: