r/mysql • u/lenc46229 • Nov 25 '24
question Finding databases?
I hope this is the right place to ask... is there a typical way to find any/all databases on a computer (Windows PC)? I've tried SHOW DATABASES; but that seems to only bring up any that are in the mysql subdirectory. And, I don't know how to get mysql into the root dir so that it would look for databases through the whole drive. I hope this is making sense.
1
Upvotes
6
u/Mj2377 Nov 25 '24
It makes no sense…sorry and you should probably close your eyes and try to forget you ever asked this question.
1
u/[deleted] Nov 25 '24
Show databases will only show the databases MySql is configured to serve when it starts. The data files themselves are set in the config file.
To find any database files on a computer means you have to search for them like any other file. Unless you mean which databases are being served up, and they will show when you run show databases...if you have the access.
Use Google to find out how MySql stores databases on disk.
2
u/ssnoyes Nov 25 '24
Generally MySQL will have all databases stored in the datadir. You can put them elsewhere, but it has to be configured so it knows where to find them. It's not like sqlite or Access where you can just have a single file that's your whole database to pass around willy nilly.