Sample Header Ad - 728x90

MariaDB remote access ERROR 1045 (28000): Access denied

0 votes
1 answer
3855 views
MariaDB 10.3.27. Debian 10 Buster. I've followed the instructions to grant remote access to a user to my remote MariaDB server: 1. Edited /etc/mysql/my.cnf: [mysqld] #skip-networking #bind-address = skip-networking=0 skip-bind-address 0. Created a user: CREATE USER 'theuser'@'%' IDENTIFIED BY 'mypass'; GRANT ALL PRIVILEGES ON *.* TO 'theuser'@'%' IDENTIFIED BY 'mypass' WITH GRANT OPTION; FLUSH PRIVILEGES; SELECT User, Host FROM mysql.user WHERE Host 'localhost'; +---------+------+ | User | Host | +---------+------+ | theuser | % | +---------+------+ 0. Restarted MariaDB: $ sudo systemctl restart mariadb $ systemctl status mariadb ● mariadb.service - MariaDB 10.3.27 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2021-05-17 01:00:59 -03; 20min ago 0. Opened the 3306 port: $ sudo ufw allow 3306/tcp $ sudo ufw status | grep 3306 3306 ALLOW Anywhere 3306/tcp ALLOW Anywhere 0. Checked open port locally: $ nmap -p3306 remote_ip PORT STATE SERVICE 3306/tcp open mysql But when I try to access from my local machine to the remote server: $ mysql -utheuser -pmypass -hremote_ip mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'theuser'@'my_ip' (using password: YES) I'm missing something or there are some errors I can't see?
Asked by schrodingerscatcuriosity (111 rep)
May 17, 2021, 04:27 AM
Last activity: Jul 26, 2024, 01:09 PM