Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After I restart my computer, my databases doesn't show when I run the command show databases; It only shows the following: information_schema test

If i go to /usr/local/var/mysql, my databases files are there.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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:

[client]
port = 3306
socket = /tmp/mysql.sock

[mysqld]
port = 3306
basedir = /usr/local/mysql/
datadir = /where/your/data/files/are/

From what you are saying, your datadir should be /usr/local/var/mysql/

Restart mysql and see whether the databases turn up.

share|improve this answer
    
I'm actually on osx 10.6.6 –  Rodi01 Mar 22 '11 at 17:14
    
Ok, I have revised my answer to reflect that you are on OSX –  Linker3000 Mar 22 '11 at 18:03

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.

share|improve this answer
    
I'm logged in as root –  Rodi01 Mar 22 '11 at 17:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.