CDRs access lost on database

I ran few commands to get the access for my user on ip and got complete lost access to cdrs. any help would be highly appreciated.

SELECT host, user FROM mysql.user WHERE user = 'root';

MariaDB [(none)]> SELECT host, user FROM mysql.user WHERE user = 'root';
MariaDB [(none)]> SHOW GRANTS FOR 'root'@'localhost';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'1.2.3.4' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'1.2.3.4' IDENTIFIED BY 'abcd' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
bind-address            = 127.0.0.1
#bind-address            = 0.0.0.0
sudo systemctl restart mysql

root@pbx:~# sudo systemctl restart mysql
root@pbx:~# grep -r "bind-address" /etc/mysql/mariadb.conf.d/
/etc/mysql/mariadb.conf.d/60-galera.cnf:#bind-address = 0.0.0.0
/etc/mysql/mariadb.conf.d/50-server.cnf:#bind-address            = 127.0.0.1
/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address            = 0.0.0.0
root@pbx:~#

sudo systemctl status mysql



MariaDB [(none)]> SHOW GRANTS FOR 'root'@'localhost';
MariaDB [(none)]> SHOW GRANTS FOR 'root'@'localhost';
MariaDB [(none)]> SHOW GRANTS FOR 'Faisal'@'localhost';

MariaDB [(none)]> CREATE USER 'Faisal'@'localhost' IDENTIFIED BY 'abcd';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'Faisal'@'localhost' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;

@kgupta Can you please suggest what to do?

I am completely out of options and the server is live now. Freepbx 17 issues.

mariadb please check /etc/freepbx.conf for AMDBUSER value and give that user permissions, but you are giving access to your user.
not sure what you are trying to do ? freepbx install script sets all the permissions properly.

1 Like