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;