How to fix mariadb root password issue?

VitalPBX Community Support General Discussion How to fix mariadb root password issue?

  • Post
    anomaly0617
    Participant

    I noticed that I get an error when I go to PBX >> Extensions >> Extensions. The error is:

    Exception: Argument 1 passed to ombutelquery::select() must be an instance of ombutelschema, null given, called in /usr/share/ombutel/www/includes/persistent.php on line 0 and defined at file /usr/share/ombutel/www/includes/query.php on line 0

    So I did some forum research before posting, and the most common answer is to do a ‘vitalpbx build-db’ from the console. When I go there, here’s what I get:

    [root@pbx includes]# vitalpbx build-db
    PHP Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[28000] [1045] Access denied for user ‘root’@’localhost’ (using password: NO)’ in /usr/share/ombutel/scripts/apply_patches:0
    Stack trace:
    #0 /usr/share/ombutel/scripts/apply_patches(0): PDO->__construct()
    #1 /usr/share/ombutel/scripts/apply_patches(0): patcher->query()
    #2 /usr/share/ombutel/scripts/apply_patches(0): patcher->have_patch_table()
    #3 /usr/share/ombutel/scripts/apply_patches(0): patcher->applied()
    #4 /usr/share/ombutel/scripts/apply_patches(0): patcher->apply()
    #5 {main}
    thrown in /usr/share/ombutel/scripts/apply_patches on line 0
    Done

    I know the root password of the mariadb instance. I tried it via “mysql -u root -p” and got right in. So, what do I need to do for VitalPBX to also know this password, and will it resolve my original issue?

    PBX is running fine, otherwise. But I sort of do have to be able to add/edit/delete extensions. 🙂

    System Info:

    Distro CentOS Linux release 7.7.1908 (Core)
    Kernel 3.10.0-1062.9.1.el7.x86_64
    Asterisk 16.6.2
    VitalPBX 2.4.0-5
    Last boot Wed, 22 Jan 2020 15:04:19 -0500

     

    0
Viewing 3 replies - 1 through 3 (of 3 total)
  • Replies
    Up
    0
    Down

    VitalPBX comes configured to work with MySQL (MariaDB) root user but without password. So, let us analyze with calm a solution for you.

    The only thing I can recommend you now is to remove the password for the root user

    0
    anomaly0617
    Participant
    Up
    0
    Down

    That fixed it. While I’m not all that thrilled with no root password being on the mysql (mariadb) service on the server, it’s behind a dedicated hardware based firewall, so the risk should be minimal. Once the password was reset to nothing, it allowed me to run vitalpbx build-db, which in turn resolved the extensions problem. For those that need the command to reset the password to nothing, its:

     mysqladmin -u root -p'oldpassword' password ''

    Thanks!
    0
    anomaly0617
    Participant
    Up
    0
    Down

    That fixed it. While I’m not all that thrilled with no root password being on the mysql (mariadb) service on the server, it’s behind a dedicated hardware based firewall, so the risk should be minimal. Once the password was reset to nothing, it allowed me to run vitalpbx build-db, which in turn resolved the extensions problem. For those that need the command to reset the password to nothing, its:

     mysqladmin -u root -p'oldpassword' password ''

    Thanks!
    0
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to fix mariadb root password issue?’ is closed to new replies.