3

I recently took over a website and I have missing tables in the civicrm database (under wordpress). I want look at the civicrm database but I don't know where the database is stored. How can I find the physical civicrm database file so I can download it and run some queries to see what's there? When I go to phpMyAdmin on the server, it only lists the wordpress database.

Below is what I see when I look at phpMyAdmin and this is the only db. I have looked at all of the table names in this db and there are no civicrm tables.

Thanks

enter image description here

4

You can find the civicrm database listed in the civicrm.settings.php

 <wordpress>/wp-content/uploads/civicrm/civicrm.settings.php

Apart from that , you have two possibilities

1)Wordpress and Civicrm both use same database

2) Civicrm has separate database

If wordpress and civicrm has same database , you can search in wordpress database tables which have prefix civicrm_*

  • Thanks. That's what I thought, but there are no civicrm tables in the WP db. I found a database name in civicrm.settings.php, but I can't find a file with that name on the server. In theory, it shouldn't be that hard to find the file, but I don't know where I'm going wrong. – kzburn Mar 4 '18 at 16:37
  • If you want, I can help you figure that out.let me know – harshal Mar 4 '18 at 18:02
  • I would appreciate any suggestions. – kzburn Mar 4 '18 at 19:36
  • @kzburn, I would have helped if I ws able to access your environment – harshal Mar 4 '18 at 19:39
  • Hi @kzburn, check for r9Z99F_2_civicrm_* as prefix in your database list of tables – harshal Mar 4 '18 at 20:14
2

If you are sure you are in the correct database for your wordpress your civi is installed on, you should see this.

enter image description here

****EDIT****

Go to wp-content/uploads/civicrm/civicrm.settings.php

Look for this line

if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {

define( 'CIVICRM_UF_DSN' , 'mysql://YOUR CIVI DATABASE LOCATION SHOULD BE RIGHT HERE');

  • When I go to phpMyAdmin, I only see one database. – kzburn Mar 4 '18 at 20:03
  • See my edits above. That should help you find your civi database location. – fdarn Mar 5 '18 at 13:24
  • Thanks.....I found that and I know the name of the database, but when I ftp to our server, there isn't a file there with that name. At least I'm on the right track. Thanks for your help! – kzburn Mar 5 '18 at 15:36
  • You won't see it with ftp, you would see it in phpmyadmin, but you might be logging in to phpmyadmin as a user that doesn't have access to the civi database. Use the user/pass that's listed in the CIVICRM_UF_DSN setting. – Demerit Mar 6 '18 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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