I want to deploy a Django app on a virtual machine hosted on a cluster. For this app i need access to a MySQL database that is also hosted on the cluster.
When I launch $ mysql -h 1XX.1XX.1.1XX -u test -p test on the virtual machine, i can access the database.
But when i run the django server, i've got an error : django.db.utils.OperationalError: (1043, 'Bad handshake')
It is the same error as when the versions of MySQL between the cluster and the VM are different but I installed the same.
Thank you for help.
Related
When attempting to connect to remote MySQL server from my Windows machine using MySQL workbench - I get an error about connecting to localhost (unsure where the software is picking up localhost). However when I attempt to connect through an SSH tunnel it connects just fine (I cannot use this for the software I am creating though)
when I run netstat on the server:
netstat command
...(more entries)
the bind address has been altered in mariadb and mysql configs. if there are any more configs people would like to see to help with solution please let me know. I have also set up the user in mysql to allow remote privileges:
mysql users
I am pretty confused.
I have installed mysql using dmg from mysql website.
mysql-8.0.23-macos10.15-x86_64.pkg
package version: mysql-8.0.23-macos10.15-x86_64.dmg
I have connected to localhost server using: mysql connect -h127.0.0.1 -uroot
I am successfully connected and able to run operation/queries.
But not able to connect through django project. I suspect it is due to server not running. I am unable to understand when server is not running how i am able to connect from terminal.
UPDATE:
After reading answer on dba exchange I realised it might be because I
ran kill to stop mysql server.
I am running an AWS RDS. I used to be able to connect to it via MySQL workbench, and my EC2 instance running a laravel application was also connected to it which has been working fine so far but I had an issue with my storage space and needed to download and upload some files on my ec2 instance just to free up some space.
Because I was connecting using as Filezilla I had to use the command sudo usermod -a -G www-data ubuntu to give ubuntu to the group so i can have access to read and write.
The problem is after running this command i noticed I can no longer connect my workbench to the RDS again. Even my laravel application can't access the RDS again.
My Laravel app throws this error
php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
while workbench throws this
Your connection attempt failed for user ....
How can i resolve this?
I had a similar problem, I restarted my BD RDS
I installed LAMP on a VM instance on Google cloud but when i try to access mysql database remotely from my linux terminal using
$ mysql -u username -h ipaddress -p
after entering password nothing happens (no error). I tried accessing it locally via ssh it works.
Is there any other setting on cloud platform. I need to change before accessing database from a remote pc. Followed this tutorial but it just stops after entering password.
Tried commenting out bind address but didn't work. Need help.
Just to be clear, are you using the mysql command on your remote machine or through SSH?
Normally, you should never allow external access to remote MySQL for security reasons, especially if the only app accessing the data is local. (however, it's unclear if that is the reason why you can't connect)
This is how you should connect:
Connect to your remote VM using SSH (ex: ssh user#ipaddress)
THEN, connect to your MySQL instance.
When connecting using a DB editor, some editors allow MySQL connections through SSH. Sequel Pro for Mac does this very well.
I am new to AWS. I followed AWS quick start documentation and created my Web server and Database server. I can connect my Web server from my browser and ssh client. But i couldn't connect my MYSQl database from SQL workbench or MySQL yog.
I tried connecting it through command line from my web server its connecting. I thought its due to some user access problem and tried changing the user access by query and it says access denied for giving grant permissions. please suggest me the how to connect to AWS RDS from remote machine(any sql gui tool).
I'm not sure if it's proper way, but you can create ssh tunnel like that:
ssh -N -L 6033:RDSendpoint.rds.amazonaws.com:3306 -i /path/tokey/aws-key.pem ec2-user#EC2IPAddress
And then connect using mysql -h 127.0.0.1 --port=6033 -u yorrdsuser -p from local.