Recently I installed MySQL server on my Debian machine using Advanced Packaging Tool, and I'm curious to know where it's installed and how I can find all the source files and user databases.
I've only been able to find the configuration at /etc/mysql
, and to find some other small pieces using whereis
command and find / -name "mysql"
, but besides that, nothing much exciting appears on screen.
Best Answer
Debian versions of MySQL packages store the MySQL data in
/var/lib/mysql
directory by default. You can see this in/etc/mysql/my.cnf
file also.Debian packages don't contain any source code, if that is what you meant by source files. Binaries are installed generally in
/usr/bin
and/usr/sbin
directories.You can see where the package files are installed by using
dpkg -L <packagename>
command. Note the capital L letter.If you want to know the packet name for MySQL, you can use
dpkg -l | grep mysql
to view all packages that have mysql in their names.