I'm trying to connect to A MySQL database in order to use it for asp.net project in c#.
I'm getting error 40 on SSMS which means I inserted the wrong server name or the MySQL server doesn't allow remote connections.
Error from mysql workbench:
Check that mysql is running on server [ip]. Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed). Check the root has rights to connect to [ip] from your address (mysql rights define what clients can connect to the server and from which machines).Make sure you are both providing a password if needed and using the correct password for [ip] connecting from the host address you're connecting from
- Ip of the server is correct
- mysql server is correctly installed
- I can enter mysql with root and password by putty
- I created an user@myipaddress to log from ssms
- I granted the user created all priviliges with
GRANT ALL ON *.* TO 'user'@'ip' WITH GRANT OPTION;
- I tried editing iptables with
sudo iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
- I enabled ufw and allowed MySQL
- I modified the mysql config file inserting binding-address:0.0.0.0 and port:3306.
I'm using almaLinux vps. I installed MySQL server using yum install mysql-server
. I can't really get what is the problem.