Task C Creating a Database User
For testing purposes, this section explains the steps required to create the database user with appropriate privileges in a database, using the MySql database server.
- Procedure
- Verify that you are connected to the MySql database server as a root user. If not, type the command:
mysql -u root -p
- Type the following command at the mysql command prompt to create a new user:
create user ’asguser’ identified by ’asgpass’;
- To grant the appropriate privileges to the database user, type the following command at the mysql command prompt:
grant create,select,insert,update on asgstat.* to asguser@'%' identified by ’asgpass’;
- Type the following command to reload the privileges from the grant tables in the database:
flush privileges;
For Oracle DatabaseAsk your database administrator to create a database user (for example
asguser
) and grant theconnect,resource
privileges to this user.For MS SQL Server DatabaseAsk your database administrator to create a database user (for example
asguser
) and grantcreate,select,insert,update
privileges to this user.For DB2 DatabaseAsk your database administrator to create a database user (for example
asguser
) and grantALL,CONTROL,CONNECT,insert,SELECT
privileges to this user.