Score:0

"[message] => DB Error: no such table" error after installing civicrm

pk flag

I installed CiviCRM 5.47.3 plugin using composer in the centos 8 server.

my drupal version is 9.3.5

After installing CiviCRM on the server CiviCRM plugin is enabled automatically in admin extension section

But after configuring CiviCRM no page is loading and facing the below error,

Initialization Error

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'civicrm_cidd.civicrm_setting' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'civicrm_cidd.civicrm_setting' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
 [nativecode=1146 ** Table 'civicrm_cidd.civicrm_setting' doesn't exist]"]
)

I installed CiviCRM by referring the below doc https://docs.civicrm.org/installation/en/latest/drupal8/

PHP version is v8.0.27

any guide is appreciated if need any more details please comment

fr flag
Install the cv tool and install CiviCRM using the very verbose option. It should look like this: cv core:install --cms-base-url="http://YOUR-SITE-URL/" --db="mysql://DBUSER:[email protected]:PORT/DATABASE" -vv. I've been struggling with this for a couple of days and found that it was a database permission issue as well as a weird permissions problem that only exists in my local machine because I moved my web root from one HD to another in the same machine and although all other sites work fine, CiviCRM is not happy. I installed Drupal 9 / CiviCRM on the old drive and it installed fine.
Kevin avatar
in flag
Error is pretty clear? Have you validated any of this?
jayaprakash R avatar
pk flag
yes, i have validated the Mysql database permissions, checked the civicrm.settings.php for credentials, and gave the super permission for the DB user and all privileges to the database. If reverted the CiviCRM installation site works and if I install the CiviCRM am facing this error
lk flag
Please provide a little more detail. Having installed the codebase with composer, what actions did you take to install the CiviCRM application? The linked document provides various options on this. Did you use the web UI installer or cv on the command line?
jayaprakash R avatar
pk flag
First I installed CiviCRM (core, theme) using composer in centos server and then CiviCRM plugins enabled automatically in extension at admin->extension. i used below commands, ``` $ cd /var/www/drupal.example.org $ composer config extra.enable-patching true $ composer config minimum-stability dev $ composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.47.3' ```
br flag
are your civicrm tables in the same db as your drupal tables, or in a separate db?
jayaprakash R avatar
pk flag
I have a separate database for CiviCRM and I didn't create any tables in that DB. I think when configuring the CiviCRM it will add the tables automatically. If I am wrong, please guide me what to do
Score:0
cn flag

Verify that your database credentials in your CiviCRM settings file web/sites/default/civicrm.settings.php is correct.

If you are using a separate CiviCRM database (i.e., not using the same database as drupal), you need to specify separate SQL credentials.

By default, CiviCRM uses the installed (Drupals) MySQL credentials. Have you verified that you took the following under consideration? https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-connection

Verify the MySQL user has super privileges. You should NOT be using root in SQL, but instead should have a separate user account.

GRANT SUPER ON *.* TO 'civicrm_user'@'localhost';

Another thing to check: Make sure your DB password does NOT have any special characters in it. I ran into a similar error with special characters in my DB password, which prevents Civi from connecting to MySQL (Even tho Drupal could).

fr flag
It appears to be a problem with Database credentials but I can't figure out where it's occurring. I ran into this issue today on a local development site Drupal9/CiviCRM 5.58.0. My user has no password so the connection in the civicrm.settings.php file reflects that. On my old development server which is identical to the new one, this is no problem but for some reason it doesn't work on the new server. I dumped and imported the CiviCRM tables and it works so in my case, it is the install script not writing to the database and installing CiviCRM without tables. Quite frustrating.
jayaprakash R avatar
pk flag
Thanks for your reply greyson. your points are good but I have checked all the points you have mentioned and provided super permission, didn't include special char, using separate db user, and changed the CiviCRM settings as per the separate db credentials. But no luck!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.