Marketplace:

 
Cheap web hosting provider with extensive free web hosting features
Register or buy domain name, include free email and domain forwarding services
Cheap and affordable domain name registration and domain name transfer from $2.95/yr

 

   

Create a New User

next up previous contents index

The mysql-navigator can be used to create a new user. Fire it up 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

  altrop$ mysqladmin -u root -pYYYYY reload


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



  $ mysql -u kayon -pXXXXXX customers



Copyright (c) 1995-2004

 

      

Marketplace:
Facts: " The ultimate metric that I would like to propose for user friendliness is quite simple: if this system was a person, how long would it take before you punched it in the nose.   "  

Tuesday 6 January 2009 12:57:28 1231246648