Connect to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 440music
    Junior Member
    • May 2020
    • 15

    Connect to database

    I'm using EspoCRM 7.5.5 on my local server and the install worked but I'm able to connect to the database and the data is in the database.

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 22.04.2 LTS
    Release: 22.04
    Codename: jammy​

    PHP 8.2.8 (cli) (built: Jul 8 2023 07:10:21) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.2.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.8, Copyright (c), by Zend Technologies

    I've cleared the cache and rebuilt and still not seeing database info
    PHPMyAdmin show tables with data and config-internal.conf ​is correct

    I've looked at multiple post and read the docs but not connecting to data base. I've run command line clear_cache.php and rebuild.php still no data in EspoCRM
    I see the data in phpMyAdmin just can't figure out why the info isn't in EspoCRM

    The log file said line 48 in DatabaseParamsFactory.php was causing the error
    line 48: throw new RuntimeException('No database params in config.');​

    Error Message:
    "[object] (RuntimeException(code: 0): No database params in config. at /var/www/vhosts/espo/application/Espo/Core/ORM/DatabaseParamsFactory.php:48)"}
    [2023-08-07 18:29:01] ERROR: Uncaught Exception RuntimeException: "No database params in config." at /var/www/vhosts/espo/application/Espo/Core/ORM/DatabaseParamsFactory.php line 48 {"exception":
    "[object] (RuntimeException(code: 0): No database params in config. at /var/www/vhosts/espo/application/Espo/Core/ORM/DatabaseParamsFactory.php:48)"}


    GNU nano 6.2 data/config-internal.php
    <?php
    return [
    'database' => [
    'host' => 'localhost',
    'port' => '3306',
    'charset' => NULL,
    'dbname' => 'espo',
    'user' => '******',
    'password' => '********',
    'driver' => 'pdo_mysql'
    ],
    'smtpPassword' => '*******',
    'logger' => [
    'path' => 'data/logs/espo.log',
    'level' => 'WARNING',
    'rotation' => true,
    'maxFileNumber' => 30,
    'printTrace' => false
    ],
    'restrictedMode' => false,
    'webSocketMessager' => 'ZeroMQ',
    'clientSecurityHeadersDisabled' => false,
    'clientCspDisabled' => false,
    'clientCspScriptSourceList' => [
    0 => 'https://maps.googleapis.com'
    ],
    'isInstalled' => true,
    'microtimeInternal' => 1691433352.916255,
    'passwordSalt' => '31102a0b0c0bcea8',
    'cryptKey' => '41b7eba1c5c7a36f9d2805ce32bca620',
    'hashSecretKey' => '72dc6a34bf3e0a6d397b0d79ffdbe5d4',
    'defaultPermissions' => [
    'user' => 33,
    'group' => 33
    ],
    'actualDatabaseType' => 'mariadb',
    'actualDatabaseVersion' => '10.11.4'
    ];


    I may have found the fix, I'll report my results if it works
  • 440music
    Junior Member
    • May 2020
    • 15

    #2
    OK I'm rebuilding the database table by table and I've gotten to the table "contact" the database I'm working with has a column labeled "name' and the new database table doesn't have the column name.

    The admin logIn has stopped working and php command.php set-password [username] isn't allowing me to reset/change the password. I've tried with and without the brackets
    Last edited by 440music; 08-07-2023, 10:51 PM. Reason: mysql -u phpmyadmin -p espo < espo.sql Enter password: ERROR 1054 (42S22) at line 22195: Unknown column 'name' in 'field list'

    Comment

    • 440music
      Junior Member
      • May 2020
      • 15

      #3
      Tables that gave me an error
      Contact (name) column was missing
      Currency (delete) column was missing
      Lead (name) column was missing
      User (name) column was missing

      I don't know if it was my error or if the columns didn't install properly


      Comment

      • lazovic
        Super Moderator
        • Jan 2022
        • 810

        #4
        Hi 440music,

        Please tell me how did you rebuild database table by table? It seems that indeed the tables were formed incorrectly.

        Now this problem does not bother you? Perhaps we can help you with something?​

        Comment


        • item
          item commented
          Editing a comment
          It’s seemt to be « Person » template entity. There are no « name » field but firstName and lastName.

          How have you got Espo.SQL dump ?

          Have it get somes config params like password hash from old instance ?
      Working...