kitokid
kitokid

Reputation: 3117

new database and new user in mysql

I had followed these steps.

1) I log in as root user to mysql.

2) I create a new database named "studentdb".

3) I use that db and import db tables from sqldump.

4) I create new user for that studentdb and give that user certain privileges.

5) but when I check user select * from mysql.user; , I couldn't find the user that I have created.

6) so, when I check the newly created db by using this command, select * from mysql.db order by db;, I couldn't find it either.

7) but when I use show databases;, I can find the newly created database.

So, why I couldn't find the newly created db in step 6?

What might be my missing steps to use as a created user to that new database by using mysql -ublah -p studentdb?

Upvotes: 1

Views: 226

Answers (1)

CyberDem0n
CyberDem0n

Reputation: 15056

6) So, why I couldn't find the newly created db in step 6?

Table mysql.db is used to store access rights to databases by users/hosts. It doesn't contain all databases.

Upvotes: 1

Related Questions