234
Appendix B     Getting Started with MySQL
This command creates a row in the user table in mysql database for user rreh 
man and grants permission for everything to user rrehman on database testdb.
Setting Password for a User
You can assign a password to the user upon creation. The following command cre 
ates a user rrehman and assigns a password boota.
grant all on testdb.* to rrehman identified by `boota';
To assign a password later on, use the following command:
mysql> set password for rrehman = password( kaka );
Query OK, 0 rows affected (0.00 sec)
mysql>
Granting Permissions
The  grant command is used to grant different levels of permissions to users.
Refer to the following command where different permissions are assigned to a user rr
on localhost.
mysql> grant CREATE,INSERT,DELETE,UPDATE,SELECT on snort.* to 
rr@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql>
Using mysqladmin Utility
The mysqladmin utility is used for database administration. A complete discus 
sion is beyond the scope of this book. The following output of the command shows
some of the tasks that it is capable of doing.
[root@conformix /root]# mysqladmin
mysqladmin  Ver 8.18 Distrib 3.23.36, for redhat linux gnu on i386
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
   #,   debug=...       Output debug log. Often this is 
 d:t:o,filename 
   f,   force
Don t ask for confirmation on drop database; 
with






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

toronto web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved