After I restart my computer, my databases doesn't show when I run the command
It only shows the following:
If i go to /usr/local/var/mysql, my databases files are there.
Edit: Now I know you are on OSX I have revised everything!! ...
Do you have an /etc/my.cnf file? if so, cat (display) it to see where it thinks your database files should be (the datadir= line).
If you don't have a my.cnf file, create one as follows:
From what you are saying, your datadir should be /usr/local/var/mysql/
Restart mysql and see whether the databases turn up.
You may logged into the wrong user. Are you logged in as root? Usually the root user will have access to all the databases. Then you can give privileges to other users.