AWS Lightsail to external mySQL connections failing - mysql

I created a new instance (bitnami WordPress) in AWS Lightsail. Everything works fine. I am trying to connect to an external MySQL server (outside of AWS) from this Lightrail instance.
I am using the command:
mysql -u user_name -h xx.xx.xx.xx -p
Unfortunately, I am receiving this error message. I am unsure why the Lightrail instance resolves the external IP (outside of AWS) to the local Lightrail instance.
ERROR 1045 (28000): Access denied for user 'user_name'#'ec2-xx-xx-xx-xx.us-east-2.compute.amazonaws.com' (using password: YES)
I have performed an extensive search and could not find any similar issues.
FWIW, I have tried to add skip_name_resolve to the my.cnf file in vain.
I hope someone has run into this situation and was able to find a solution.
I could open a ticket with AWS; however, given that I have a basic account, I cannot place any support calls with AWS. I appreciate your help in advance.

Related

ERROR 1045 (28000): Access denied for user 'root'#'localhost' (USING PASSWORD = NO) issue Freeradius server causing aborted connexion

Hi I'm trying to get a mariadb/freeradius/daloradius server up but i keep getting this log from systemctl -xe on my mariadb/mysql service, i came across that after figuring it was the sql connection that was problematic, freeradius shows me the same :
I'm getting frustrated, i ran across almost every config file, all should be in order but no this keeps happening, the radius server is trying to connect to my root sql user when i pointed to him in his config file that he should use the one i created especially for him and i can't manage to understand why, do mariadb needs the root credentials before even allowing it to connect to it ? I'm clueless please help.
This message tell you. that either the credentials in your config is not ok or that root user is not authorized to login.
Best practice is to take your mysql config and try to connect with the mysql command:
mysql -h yourconfigurationhost -u yourconfiguration user -p yourconfiguration password yourconfigurationdatabase
Be shure doing this with your application user.

RDS Mysql ERROR 1045 (28000): Access denied for user #IP (using password: YES)

[This is not a duplicate question]
I have created a RDS MySQL instance with same Security Policy and under same VPC as my EC2 instance.
However when i am trying to access the Instance from EC2 machine i am getting error:
ERROR 1045 (28000): Access denied for user 'User'#'IP' (using password: YES)
Not sure if i am missing Anything.
In MYSQL setup we can resolve this error with added Privileges for User on the IP.Not sure how can we resolve this since i am unable to access the Instance itself.
Anyone faced this issue before?.
I have followed the Document: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.NonRDSRepl.html#MySQL.Procedural.Importing.Create.RDS.Database
mysql -h dandy-dbamazonaws.com[...] -u root -p
-h - put your endpoint
-u - username you set for your local mysql (root in my case). Don't confuse it with instance name
-p - after you hit 'enter' enter the password for your instance (the one you set up during instance creation)
hope it will work! that's how I resolved this issue
Maybe late but I had the same problem today.
Confirm the MasterUsername, with the AWS CLI running aws rds describe-db-instances or in the web console, showing the cluster details on the configuration tab.
Confirm the password, if you are using linux consoles (bash) some some characters may be problematic like # or !.
If you are using ssl connection you can't use --ssl-mode=DISABLED. You have to use --ssl-mode=VERIFY_CA (if you are connecting to endpoint) or --ssl-mode=VERIFY_IDENTITY (OR VERIFY_CA) if are connecting to server endpoint.
The goofy ones always get you: I experienced the same problem after changing the master password but let slip the important fact that by default changes don't take effect until the next maintenance window.
In my scenario I was connecting to an Aurora MYSQL serverless v2
Check you are connecting to the cluster writer instance endpoint
Modify the master password and apply changes immediately

Access denied for remote cloudSQL from a cloud instance

I have two VM instances in google cloud console connecting to the same cloud SQL database, with no issues. I created a new instance and I can't connect it to the cloud SQL. The new instance was created as follows:
Clone an existing instance that works with the database.
Add the new ephemeral IP to the list of authorized networks of the database.
SSH to the new instance and connect to mysql with the same command that works on the other two instances.
Mysql connection is denied for the user:
$ mysql -u <user> -p -h <cloudSQL IP>
Enter password:
ERROR 1045 (28000): Access denied for user 'user'#'IP' (using password: YES)
Am I missing something? I have followed the documentation and I can't find any similar issue.
After one or two hours it was working. Changes took a while though. I tried restarting both the instances and the database, unsuccessfully. But time did the trick.

Can connect from PHP but not from Linux Redhat console

I'm trying to get access to my mysql DB from linux RedHat console. All the tome I'm getting:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES).
Obviously it seems that the root password is incorrect, but it isn't, because I can connect without no problems from the Website. All the PHP configuration files from several installed frameworks are using the same configuration parameters.
I'm using the following to connect from console:
mysql -u root -p
When the console prompts the password I can't get access.
Any idea?
Thank you very much in advance.
Jordi
Did you try resetting the password for root#localhost? Might be fastest way to solve this.
check if php connects from the same machine/ip and if mysql binds address 0.0.0.0.
dev.mysql.com/doc/refman/5.1/en/… : For example, if you bind to 0.0.0.0, you can connect to the server using all existing accounts. But if you bind to 127.0.0.1, the server accepts connections only on that address. In this case, first make sure that the 'root'#'127.0.0.1' account is present in the mysql.user table so that you can still

Problem starting up mySQL

I just downloaded PHP and I tried running mySQL with the command:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe
And I got the error:
ERROR 1045 (28000): Acess denied for user 'ODBC'#localhost' (using password: YES)
I found a solution online with linux, but I'm running vista on this machine and have no clue what all of that meant. Please help, I'm tired of using the school's terminals.
It means one of three likely things.
you need to either create a new user in mysql with the password you are using
set the password of the "ODBC" user to what you are using
grant permission to the host you are attempting to connect from, in this case localhost
Without more information to your specific setup it will be very difficult to answer with more accuracy.
Have you tried supplying the username to the command, for example:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe -u root
?
Check the manual Connecting to and Disconnecting from the Server