Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Remote User Permissions

On any host in domain user kayon would like to connect to the customers database with select privileges on the MySQL server running on

You can arrange this as follows. The first insert adds this user's password to the users table. The second then gives this user access to a particular database.


  alpine$ mysql -u root -pYYYYYY mysql

  mysql> insert into user (host,user,password)
      ->  values ('', 'kayon', password('XXXXXX'));
  Query OK, 1 row affected (0.00 sec)

  mysql> insert into db (host,db,user,select_priv) 
      -> values ('', 'customers', 'kayon', 'Y');
  Query OK, 1 row affected (0.00 sec)

  mysql> exit

  alpine$ mysqladmin -u root -pYYYYYY reload

Then on, for example:

  inco$ mysql -h alpine -u kayon -pXXXXXX customers -e 'show tables'

Copyright © 1995-2006 [email protected]

  Published under the terms fo the GNU General Public License Design by Interspire