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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

Create a New User


The mysql-navigator can be used to create a new user. Start it and open a connection to the localhost server with user root and database mysql. Under the MySQL menu select User. Choose the action to permform, prvoide the relevant information then Fire. Then under the MySQL menu select Privilege to grant database access. Note that you may still need mysqladmin -u root -p reload?

Alternatively, you can do it 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.



  $ mysql -u root -pYYYYY mysql

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

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

  mysql> exit

  alpine$ mysqladmin -u root -pYYYYY reload

Then this user can access the specified data base to perform SELECT queries:



  $ mysql -u kayon -pXXXXXX customers


Copyright © 1995-2006 [email protected]

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