nueva base de datos y nuevo usuario en 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?

preguntado el 30 de julio de 12 a las 06:07

Can you show the actual command you used to create the new user? -

1 Respuestas

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

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

Respondido 30 Jul 12, 06:07

Thanks for explanation. why I can't log in with my created user, I think it wasn't created properly.. I think. So, I created next time and now can log in. But I accepted your answer even thought as it cover some of the points the I want to know. - kitokid

one follow up: first time, I created my user using some specific ip instead of localhost. So for that kind of users , how can I view all user from mysql command? - kitokid

select * from mysql.user; But you said that you couldn't find the user that you have created... May be you created user not in this mysql instance? Or you make a mistake in create/grant command? - CyberDem0n

yah. I think I made mistake somewhere. So I couldn't see the user and log in. Now all ok. - kitokid

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.