1. Log in to your mysql server

2.Create New datbase

mysql> create database dbimam;
Query OK, 1 row affected (0.00 sec)

3. Create all privilege (insert etc) to user.

mysql> grant all privileges on dbimam.* to ‘dbimam’@’%’ identified by ‘imam’;
Query OK, 0 rows affected (0.00 sec)
mysql> select user, password, host  from mysql.user;
+——————+——————————————-+————+
| user             | password                                  | host       |
+——————+——————————————-+————+
| root             | *940FAC96724096B2E6DA18EEB9D6EC195394AEFC | localhost  |
| root             | *940FAC96724096B2E6DA18EEB9D6EC195394AEFC | labjarkom8 |
| root             | *940FAC96724096B2E6DA18EEB9D6EC195394AEFC | 127.0.0.1  |
| debian-sys-maint | *ADF54980010F29064557377FA0DE33FCB5EFBBC0 | localhost  |
| dbimam           | *A04EBF17D50C52DA8B206E910EF0565B4403FD9D | %          |
+——————+——————————————-+————+
5 rows in set (0.00 sec)

mysql> create database dbimam1;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on dbimam1.* to ‘dbimam’@’%’;
Query OK, 0 rows affected (0.00 sec)

Please Log in to your mysql server with user dbimam

lab-jarkom-8@labjarkom8:~$ mysql -u dbimam -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.1.69-0ubuntu0.11.10.1 (Ubuntu)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| dbimam             |
+——————–+
2 rows in set (0.02 sec)

mysql>
mysql> use dbimam;
Database changed
mysql> create table tes1 (id int, name varchar (25));
Query OK, 0 rows affected (0.09 sec)

mysql> show tables;
+——————+
| Tables_in_dbimam |
+——————+
| tes1             |
+——————+
1 row in set (0.00 sec)

mysql> insert into tes1 values (1, ‘testing’);
Query OK, 1 row affected (0.00 sec)

mysql> select * from tes1;
+——+———+
| id   | name    |
+——+———+
|    1 | testing |
+——+———+
1 row in set (0.02 sec)

mysql>
mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| dbimam             |
| dbimam1            |
+——————–+
3 rows in set (0.00 sec)

mysql>