So I am attempting to use MySQL workbench to connect to a database in the cloud on AWS RDS services.
When I attempt to connect I get an error like this.
Access denied for user 'admin'#'ip_octet1-octet2-octet3-octet4.res.spectrum.com' to database 'default_database'
I have the database set as publicly accessible and all IPS are able to connect. The problem seems to be my client is attempting to try to connect via hostname. I have tried multiple different clients, so it seems to be an issue with AWS or my ISP. I have been able to shell into MySQL instance from other EC2 instances.
Any suggestions would be appreciated.
Your mysql user permissions should allow connecting from the particular host. you can grant permission to the existing user as below.
GRANT ALL PRIVILEGES ON database_name.* TO 'admin'#'ip_octet1-octet2-octet3-octet4.res.spectrum.com';
Reference:
Create and Grant Mysql Permissions
Based on the error you are getting, this doesn't seem to be an issue with reaching the server, as the message complains about an access denied, otherwise it would state it can't reach the host. I would go for the password route, as the admin user should get created with '%' for host. Was it a snapshot? Or created from scratch? If so, was the password properly set? If it is from scratch, you can always delete it and create it again.
Regards!
Related
I am trying to access mysql server in office remotely from home by mysql workbench.
I already solved to connect remotely. I created an user by:
mysql> CREATE USER 'myusername'#'%' IDENTIFIED BY 'some_pass';
And, with this user, I can access the database remotely. But, I don't think it's safe. #'%' means that all hosts can access once they find out 'myusername' and 'some_pass'.
Instead of that, I would like to get it done by an user whose IP is specified. (after removing the user above), I created the user below by:
mysql> CREATE USER 'myusername'#'123.456.789.012' IDENTIFIED BY 'some_pass';
'123.456.789.012' here is the IP address of my home computer.(the number is dummy, though.). With user like this, it allows only the specified host to access. I think it is safer. But, I have already tried this and didn't work. I got the error below on mysql workbench on home computer when trying to connect remotely (by test connection from mysql workbench):
Failed to Connect to MySQL at XXX.XX.XX.XXX:3306 with user myname
Host 'XXX-XXX-XXX-XX-XX.abc.defg.hi.jk' is not allowed to connect to this MySQL server
I don't know why this error pops up.
and also, I tried the user with IP addresses like '123.456.789.%' or '%.456.789.012' which got the same error.
Is there another way to accomplish remote connection safer?
I want to connect to a remote mysql database and fill in an IP address, but what is prompted here is another IP address(My local ip). What should I do? How can I solve it?
I haven't searched related questions, only found a jdbc: rmi://, but mysql does not seem to need rmi.
The connection to the remote server succeeded. But the user connecting is not allowed to. The message you've got is from MySQL.
So you need to use a user that can connect remotely or you need to grant access for 'root'#'171.221.xxx.yyy' e.g. GRANT ALL PRIVILEGES on database.* to 'root'#'171.221.xxx.yyy' identified by 'aPassword'
I have installed and configured mySQL with WAMP server in a separate dedicated server for our Bug tracking Application. (eg.IP of the server 10.11.1.111)
I m trying to connect to the mySQL DB remotely from my local PC, but I m not able to connect.
Getting the following error,
ERROR 2003 (HY000): Can't connect to MySQL server on '10.11.1.111'
(10060).
I ve tried creating a user from the IP I am going to connect
grant all on *.* to 'adminuser'#'10.22.2.222' identified by
'testadmin';
(adminuser#10.22.2.222) and able to see the user in the user and previleges column. But still unable to connect remotely.
I have resolved the issue by doing the following.
Login to mysqlworkbench with root credentials
Go to users and privileges
Create account and mention the host the user will be accessing from
Go to administrative role tab and select all
Go to schema privileges , select the privileges you want to provide.
Click Apply
Go to Windows firewall setting and open the mysql port.
I need to give a remote user access to a MySQL database. I also need to limit the permissions they have to the MySQL database tables. The current database contains approx. 50+ tables so rather than revoke permissions table by table, I'm trying to give the user access with no privileges and then add those that are needed. What I've done appears to work when:
I'm logged in as root (via SSH)
I login using "mysql -u username -p" - enter my password for the newly created user.
This users account honors all the privileges I've set up. However, when this user tried to connect via their desktop client - they can connect but can not view the database. When using "use databasename" they get this error:
Error Code: 1044. Access denied for user 'username'#'%' to database 'database_name'
Not sure if this helps but I'm using Media Temple DV w/ Plesk. I've first added the user. Then I SSH in and revoked ALL privileges. Then I added the privileges for the user and did command "flush privileges". Nothing is working. As I said, if I'm accessing via the command line (after SSHing in as root) the permissions are honored and I can access the database - just not remotely.
Any help would be greatly appreciated.
May be network that is allowed to connect is localhost, but not users network IP.
And check max connections amount.
If you're logged in as root via SSH and MySQL database is on the same machine, then i guess that if you run:
mysql -u username -p
you try to connect to MySQL as 'username'#'localhost' user.
If you want to connect to MySQL database from outside of this server, you need to:
create user like 'username'#'%' which allow to connect to MySQL using 'username' from anywhere ('%')
allow mysql server to connect from outside by setting bind-address more details here
I am trying to connect to a MySQL database server (remote), but I can't. I am using an user with grant privileges (not root user). The error message is the following:
Can't obtain database list from the server.
Access denied for user 'myuser'#'mypcname' (using password: YES)
"myuser" is an user I created with grant access. This user allows me to connect locally to every database. I am using the same software versions in both hosts: MySQL Server 4.1 (server) and EMS SQL Manager 2005 for MySQL, edition 3.7.0.1 (client).
The point is that I need to connect to the remote server using a different user, not root user. So, how to make the connection?
Thanks.
You have to make sure that the remote user account matches what the server will see coming in for a connection. For instance:
grant select on dbname.* to myname#mypc;
will not work if mypc is not resolvable on the server via DNS or the hosts file. In this case, you could try either using an IP, or a FQDN:
grant select on dbname.* to myname#10.1.2.3;
grant select on dbname.* to myname#mypc.example.com;
Look in connectionstrings.com to see if you have the right connection string used for MySql.
Make sure
that your MySQL server listens not only on localhost
your user can access the server from his location. Try 'myuser'#'%' in the GRANT command.
//EMS manager for mysql
//this magnificient tool provide you with a way to connect to such a server that prevents access to the server from any remote file or any way from outside world
//all you need is to have ftp access to the remote server
//in c:/program files/Ems/ you will find file called emsproxy.php
//it is what we call An (API) in programming world
//upload that file to your remote server
//then when you connect with EMS you select tunnling -->checkbox
//it will ask you on the next step to provide a full url of your emsproxy.php
//i tested that process myself. i did not have access to cpanel nieghter phpmyadmin
//thanks