Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Remote User Permissions

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

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.

On alpine.togaware.com:

  alpine$ mysql -u root -pYYYYYY mysql

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

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

  mysql> exit

  alpine$ mysqladmin -u root -pYYYYYY reload

Then on inco.togaware.com, for example:

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


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.