Forum

Unified Communications PBX System

How to fix mariadb ...
 
Notifications

[Solved] How to fix mariadb root password issue?  

  RSS

anomaly0617
(@anomaly0617)
Active Member Customer
Joined: 3 months ago
Posts: 6
10/02/2020 1:31 pm  

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

Exception: Argument 1 passed to ombutel\query::select() must be an instance of ombutel\schema, 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

 


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 2232
10/02/2020 5:20 pm  

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


anomaly0617
(@anomaly0617)
Active Member Customer
Joined: 3 months ago
Posts: 6
11/02/2020 11:59 am  

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!

anomaly0617
(@anomaly0617)
Active Member Customer
Joined: 3 months ago
Posts: 6
11/02/2020 12:04 pm  

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!

Share: