Tuesday, 28 June 2011

How to check where our database files located in linux?

Go to mysql using command line.

> mysql -u root -p
mysql> SHOW VARIABLES LIKE 'datadir';
+---------------+-----------------+
| Variable_name | Value           |
+---------------+-----------------+
| datadir       | /var/lib/mysql/ |
+---------------+-----------------+

Now

exit from mysql and do the follwoing

> cd /var/lib/mysql

Here you will see all the database exist in this folder.

Cheers!

No comments:

Post a Comment