I've confused about this problem, and still stuck out of it for a week.
I've trying to federated table in mysql, but when tried to do query select to remote table. I got this message
Error Code: 1429. Unable to connect to foreign data source: Host '172.25.97.136' is not allowed to connect to this MySQL server
while 172.25.97.136 is my ip static address not remote server's ip address
i've read this solution Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server But still didn't work.
anyone can help, please?
Can you check, are you able to connect to that mentioned ip using mysql as,
mysql -hXX.XX.XX.XX -u -p
If you are unable to login with above command,clearly it is a permissions issue.
Please check.
Thanks,
Lakshmi
Related
Our company has a database server on AWS which other the employees can connect to it with MySQL, but when I tried, I got this error message, how can I solve it?
I tried to reconfigure MySQL server but it didn't work. also I double checked username, password, url and port.
To connect to an RDS MySQL instance from MySQL WOrkbench on your dev machine, check a few things.
First, get the full endpoint to the database from AWS Management console.
Ensure the database is publicly accessable.
Also, make sure that you set up your inbound rules correctly.
Once you do these things, you can use MySQL Workbench to connect.
In the hostname field, make sure you put in the hostname you copied from AWS Management console. Do not put in extra information such as:
dbc:mysql://forxxxxxxxxxxxxx.us-west-2.rds.amazonaws.com
make sure it is:
forxxxxxxxxxxxxx.us-west-2.rds.amazonaws.com
THen specify the user name and password and MySQL Workbench will connect:
I have a project running on Docker and I'm able to connect to the database through the terminal:
mysql -h localhost -P 33060 --protocol=tcp -u 'notmyrealusername' -p
This works fine and I'm able to show the tables from the database.
However, when trying to connect via SequelPro, I get the following error:
Unable to connect to host 127.0.0.1, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
MySQL said: Protocol mismatch; server version = 11, client version = 10
Note that the project is running on MySQL 5.7.34 and the version on my computer is 8.0.23.
OS: Mac OS Catalina
What I have tried:
From this thread, I have tried also with the port of 2200 and, well, SequelPro won't let me use 127.0.0.1. So, I couldn't try the second one.
I have also granted all privileges to both 'notmyrealusername'#'127.0.0.1' and 'notmyrealusername'#'localhost', but that didn't seem to fix it either.
Replying to Philippe's questions:
Yes, If I try mysql -h 127.0.0.1, then I get the same error:
ERROR 2007 (HY000): Protocol mismatch; server version = 11, client
version = 10
Question:
Does anyone know either how to connect to 'localhost' and not '127.0.0.1' on SequelPro or why I can't seem to connect to this database on SequelPro, when, with the same data, I can easily connect via terminal?
Thanks in advance for all of the help/suggestions you can provide!
Thanks!
I have finally found the solution. For anyone wondering, the key here is that I am using Docker. In this case, as outlined in this forum post, we need to:
Use the IP address of the machine where the database is running (the
real one, not localhost) as host address.
How?
Go to your terminal and use the command ifconfig . You'll get a bunch of data, but what you're looking for is the local network IP address. This usually looks like either 192.x.x.x or 10.x.x.x.
Then, in Sequel Pro or whatever GUI you are using, use this address (192....) instead of localhost.
I hope this helps someone and saves you time :)
Happy coding!
I was deploying my Django Project on AWS (this is my first time doing this) after a lot of first time learning i got stuck at an error :
django.db.utils.OperationalError: (2005, "Unknown MySQL server host '****.*****.us-east-2.rds.amazonaws.com' (0)")
When i tried migrating my Django Project.I tried multiple solutions but none worked. I tried command mysql -u username -p password -h ****.********.us-east-2.rds.amazonaws.com but this also returned and error.
ERROR 2005 (HY000): Unknown MySQL server host '*****.*********.us-east-2.rds.amazonaws.com' (2)
UPDATE 2: I Tried using command on AWS Documentation mysql -h mysql–instance1.123456789012.us-east-1.rds.amazonaws.com -P 3306 -u mymasteruser -p which have -h before using -u and -p and an input for Port this changed the error which seems like now the connection is not not able to reach the server which seems a reasonable and a better error than before.
ERROR 2003 (HY000): Can't connect to MySQL server on '******.******l2la.us-east-2.rds.amazonaws.com' (10060)
I read in question this about this,they are talking about binding the instance to an IP.How can i do that if that could be the problem?
UPDATE1:
Screenshots:
FIRST RDS INFORMATION
EC2 instance Information
SGs information
If you require any log or information please feel free to ask in the comments.
Thanks
The security group of Database should hold a Value in Inbound Rules :
This Rule should allow connection from your EC2 Instance.Either set the IP Address or set the SG of EC2 Instance.
You can use the Private IP of your instance rather than the Public IP also.
(Not sure about Security Concerns or Advantages.)
Update After a Year: Well you should use private IP and not the same security
group.DB should only be accessible to the EC2 and not to public.
I can't connect remotely from Nodejs to a MySQL database from a domain. I've searched a lot, my ip is listed in the host list, and I've also checked the MySQL variables and the bind-address is set to *.
And, also, does anyone know why when I try to add a new host for remote mysql connections it says that the % wildcard is not allowed?
With another domain it works just fine.
Please help me figure it out.
Thanks!
You need to check if the port is open from remote by using MySQL workbench or other clients. You can also use telnet in the command line:
telnet {database ip} 3306
If you got a timeout, It seems there is a Firewall or Mysql config not listening remote IPs so call your ISP or hosting provider and ask them for open access.
But if you got "access denied" message or telnet connection was successful, we have something wrong in MySQL user privilege.
I am a layman and I am not sure if I understand correctly how does an SSH connection to a MySQL DB work.
Shown below you find a screenshot of a common GUI used to set-up the connection in object.
I understand that I need to insert the MySQL Server IP, the port, my user and password in order to connect to the SQL DB. But I do not fully understand why I need to provide a SSH Server IP address, user and password.
If I am able to connect to a MySQL Server using a direct SSH connection, why would I need to mention an SSH Server (another machine)?
Does the SSH Server act as an intermediary? If so why and how? Could you help me understand?
Thank you in advance.