• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

I can't find where MySQL stores database on Windows

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends!

What I want is to find where does MySQL actually stores a database. I thought that finding it would be as simple as this https://www.tutorialspoint.com/where-does-mysql-store-database-files shows.

Unfortunately, when I go to exact same folder, I have nothing like folder Data (shown in attached file). So, can someone tell me where can I find my database?

Thanks!
image.png
[Thumbnail for image.png]
 
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, you can store it anywhere you like. Although I realize what you really mean, is "where did the installer put it"?

Good question. In Unix-like OS's, the general default is /var/lib/mysql. But in general, Windows doesn't have a well-defined direcory sructure for things like that.

While I was known to let the Puppy look for files (RIP puppy! ) you might look in Program Files\mysql (or whateverr) for its config file. That should point to it..

Verry likely, the database itself will be under Program Files\mysql, since Windows doesn't segregate immutable and mutable files in many cases.
 
Saloon Keeper
Posts: 13014
281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't really work with MySQL, but on Windows it's common for a local DBMS to place database files in your user folder.
 
Stefan Jankovic
Ranch Hand
Posts: 30
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I just found it now

It was in hidden files/folders. Name of such hidden folder is ProgramData. Now I can navigate and see databases using this path: C:\ProgramData\MySQL\MySQL Server 8.0\Data.

Maybe someone would have use of this question if encountered similar problem like I had. I can see tables are stored in .IBD format (no idea what that is, but who cares).
 
Tim Holloway
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stefan Jankovic wrote:I can see tables are stored in .IBD format (no idea what that is, but who cares).



The ProgramData is one of the things that Microsoft has done to make themselves more Unix-like, like the \Users directory. But don't expect the Registry to vanish anytime soon!

IBD is InnoDB. MySQL is actually a SQL engine that can communicate with various plug-in file handlers. Including CSV! But InnoDB is probably the most capable of them. You can even have multiple database formats in use in a single database as I recall.
 
Ranch Foreman
Posts: 124
5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Although the question is solved (sorry for being late) may I add a thing or two:

C:\ProgramData in my eyes is about as cancer as C:\Users\<username>\AppData and quite a lot more of those "somehow Microsoft keeps making it worse" kind of hidden internals.
Sure, at least Windows pretty early on tried to copy Unix' fixed folder structure - but it still keeps failing pretty hard each day.

One major misconception Microsoft never really understood is security and permissions. Anyone remember when UAC was first introduced to the public with XP? Well, it was intended to limit access to system critical stuff - but ended up abused by most users disabling it and most installers making it useless by setting all access permissions with the privilege acquired during first time run.
Vista, 7, 8(.1), 10 ... any better? Big NOPE!
Still most installers ask where to save settings - system-wide in the programms directory or per user - with the latter one often has to be selected manually.
My guess on tjis one is: Although modern Windows is as multi-user capable as Unix already was when Bill Gates was still a kid - the majority of "personal computers" are exactly that: personal - which in windows terms mostly imply: "used by one person only".

So, why does ProgramData exists? Mostly due to ported over unix software whose devs had correct separation of code, config and data in mind. Otherwise one would probably find a database servers data in its install directory.
 
Tim Holloway
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Matthew Bendford wrote:Although modern Windows is as multi-user capable as Unix already was when Bill Gates was still a kid - the majority of "personal computers" are exactly that: personal - which in windows terms mostly imply: "used by one person only".



Actually, Unix was always a multi-user system. It ran originally on mini-computers, which were "cheap" in the sense that the machine might cost $100,000(1975) instead of over a million (1975) dollars. It was popular in college labs, where pranking - and worse - was commonplace. So security was Day 1 or close to it.

Unless Windows has changed a LOT, it STILL doesn't allow more than one user to be signed on at a time like Unix and Linux do. It has only one GUI manager and when you do a remote login, it hijacks the screen and keyboard/mouse from the local user. You have to use Citrix to get anything resembling multi-user operations from Windows (things like webservers don't count), and you have to code applications with Citrix in mind.

Windows HAS been slowly tightening the security noose, but it would require a major redesign and rewrite to make the GUI true multi-user.

Having said that, I'm sorry to report that the really good security on Linux is also often disabled. While it appears to owe something to the old GECOS OS security infrastructure, it's far from easy for most people to understand, and the really tight parts aren't generally used (or well supported) when selinux is on. The number of software products that can only run with selinux turned off is really depressing.

One thing I liked about IBM's RACF. It was relatively easy in RACF to specify that the terminals in Hall A used by users in Group B could only access files D and E using program F, where F was read-only and only between the hours of 8:30 and 4:30 on weekdays.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic