By delpeter
Hi All,
I’m trying to remotely connect to MySQL which has been installed on an Ubuntu VM in Digital Ocean. I have edited the my.cnf file as described on the MariaDB website
bind-address = VM ip address
Ran this command in MySQL within the VM
GRANT ALL PRIVILEGES ON . TO ‘root’@‘VM IP ADDRESS’ IDENTIFIED BY ‘MY PASSWORD’ WITH GRANT OPTION;
& added the database URL within J-Meter as follows
jdbc:mysql://ipofVM:3306/sakila
However, when I run the JMX file I cannot get a connection to the VM in Digital Ocean
Any suggestions please?
Thanks Del.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi!
GRANT ALL PRIVILEGES ON . TO 'root'@'VM IP ADDRESS' IDENTIFIED BY 'MY PASSWORD' WITH GRANT OPTION;
As you are connecting from your computer, you will need to allow it to connect to MySQL, which means that the command should look like ... 'root'@'1.2.3.4' ... instead, where 1.2.3.4 is your local computer’s public IP address.
However, exposing your MySQL server to the public is a bad idea. Instead, configure MySQL to listen on and allow logins from localhost only. Then, use your SSH client to set up an SSH tunnel that forwards port 3306 on your computer to port 3306 on your Droplet. As you’re connecting via the tunnel, the connections appear to MySQL as if they’re coming from inside the Droplet itself.
Once you’ve done that, you should be able to have JMeter connect to MySQL at localhost:3306 and the connection will be tunneled to your Droplet, allowing you to securely access your MySQL server from your computer.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.