Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Where and how does MySQL save databases?

kyru (Programmer)
19 Feb 09 16:58
This may look as a very lame question, but I mean, if I create a database with MySQL it seems to be nowhere. In fact I've searched the hard disk using the name I've given to the database and nothing appears. To make my application work on another computer I could save the database info into a text file  and then I could create the database in the other computer via INSERT commands, but this is just lame.

I'm using MySQl 5.1.30 in case that helps.
 
vacunita (Programmer)
19 Feb 09 19:04
Well that depends on the OS you installed it.

On Windows for instance, MYSQL has a Data folder inside the installation directory, and  inside that folder, it has folders named after each of your databases.

Inside are the files for the tables.






 

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.  

kyru (Programmer)
19 Feb 09 19:13
Yeah, it's supposed to be on a /data in MySQL folder but I don't have it. I just have /bin /Doc and /share directories.
This is a pretty weird problem...
kyru (Programmer)
19 Feb 09 19:25
Well I finally found the answer. It was putting the databases into a hidden directory so I couldnt find it. If someone else has this problem the directory can be checked by looking into the my.ini file and checking the element datadir.

Thanks for your hel Vacunita.
ingresman (IS/IT--Management)
20 Feb 09 6:18
Just out of interest what operatng system are you on ?
kyru (Programmer)
20 Feb 09 8:26
Windows XP.
ingresman (IS/IT--Management)
20 Feb 09 9:46
I run 5.0.51b under XP and that doesn't hide the data dir. Odd - they must have changed it for some reason ! - any how thanks for the steer.
peterv12 (TechnicalUser)
27 Jun 09 17:35
Can someone tell me where OS X Leopard stores the databases?
guelphdad (TechnicalUser)
29 Jun 09 14:35
When you are in mysql client run this at the command line:

CODE

SHOW VARIABLES LIKE 'datadir'

and that will tell you where the mysql data directory is. Note that will work for any OS.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close