up vote 3 down vote favorite
share [g+] share [fb]

I just installed a CRM application with a MySQL database. I thought I new the name of the database but I can't find it. Now I am trying to perform a mysqldump but I don't know the name of my database or where it's located. Most docs I read assume the admin knows where this database is located and thee name of it - I should know this, I know.

link|improve this question

feedback

2 Answers

up vote 4 down vote accepted

Under /var/lib/mysql.

link|improve this answer
Thanks. For a db dump, should this work: sudo mysqldump /var/lib/mysql/db /crm/backup/db ? – nicorellius May 26 '10 at 17:28
Uh, no. mysqldump takes a database name, not a database file. – Ignacio Vazquez-Abrams May 26 '10 at 18:14
OK, what if /var/lib/mysql/db = the db name? – nicorellius May 26 '10 at 18:21
I sincerely doubt that you have a database name with slashes in it. – Ignacio Vazquez-Abrams May 26 '10 at 18:41
I see, now I get what you are saying... The command would be mysqldump db /db_location/db. Thanks for your patience. – nicorellius May 26 '10 at 18:43
feedback

If you can login to the MySQL server through a command line you can always issue a command to show all databases:

show databases;
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.