How do I Connect to My Database Server Using MySQL Workbench? - mysql

I have a database in an Amazon Web Services instance that I'm trying to connect to using MySQL Workbench. However, I don't know what the database server is, all I know is the Public DNS and Public IP of my instance. I already set a Security Group to allow me to access my MySQL database using an external client, but how do I know what my database server is in an AWS EC2 instance?

I reserve the right to be terribly wrong but
1) change my.conf (whatever your mysql conf file is called).
And set bind-address to 0.0.0.0 as it is prob 127.0.0.1
2) stop/restart mysql daemon
3) nothing wrong with long public address. I often use elastic ip addresses which are free (sort of)
If bind-address is not changed you are screwed as per remote. It is a security default upon install

OK guys, I ended up finding out the answer myself. In MySQL Workbench, the default Connection Method is Standard (TCP/IP). I had to change this setting to Standard TCP over SSH. That was the key. After I realized that, it was easy to fill in the input fields with the appropriate values and I was able to connect to the database server on the AWS EC2 Instance.

Related

Why is my MySQL Database on AWS not accessible?

I cannot reach my MySQL Database instance I created on AWS.
What I tried was to set the public access of the Database to "Publicly accessible" here:
Also I tried to set Inbound/Outbound rules for the MySQL port here:
Honestly I think using "All" ports would include 3306 too. Anyways, I tried it this way because yet it didn't work. I cannot connect to the database via MySQL Workbench, nor can I use a ping request on the given endpoint.
I would be glad if someone here has an idea what I could try else.
This will not work if you have deployed it in a private subnet which has no internet access.
Another possibility is that there is ACLs that is stopping the traffic. Security group only touch the RDS instance, the ACLs control traffic in the entire subnet.
Here is a dev AWS tutorial that creates a web application that stores data in MySQL running on the cloud. It will show you how to setup the database and the inbound rules. Once you do, you can store data or query data from MySQL. Likewise, you can use MySQL Workbench to interact with MySQL on the cloud.
AWS RDS Tutorial

Connecting Securely to MySQL Database on an Amazon EC2 instance from another EC2 instance

I'd like to connect to a mysql database on an AWS EC2 instance from another EC2 instance, but I don't want this mysql database to be accessible from other IP addresses. Changing the bind-address in my.conf to 0.0.0.0 allows everybody to access it, and I don't feel comfortable doing this.
What's the best approach on AWS to configure this in a secure way?
It is easy to do the above. Lets say EC2-1 is your instance and EC2-2 is your MYSQL instance with Security group 1 for EC2-1 and Security group 2 for EC2-2. Add below rule in your Security Group 2. So you can only connect to MYSQL running on EC2-2 from EC2-1 and no body else can connect.

mysql 5.6 installion and configuration on windows

i have installed MySQL server with developer default, I can connect to database with local application, How ever i am not able to connect to database from other system on the network it saying unable to reach database. I access database with root user and password
please give me steps to configure my MySQL server so that i can access database from any system in my network
You will have to create a user allowing him to connect from any host ('user'#'%') and use that user to connect to your MySQL server machine. Also, you'll have to set bind-address of your MySQL configuration to your server machine's IP.
Check the following article. Although it is for Linux environment, you can get the general idea of what is to be done.
https://rtcamp.com/tutorials/mysql/remote-access/

Connect to MySQL local database via PHPMyAdmin

I have two servers running on Ubuntu. Server 1 only has MySQL installed and acts as an database. Server 2 is a Apache web server. The database is internal and so as the Apache server and they can ping each other but the database server is not accessible via the internet. I can telnet into the database server from the Apache but I can not connect to the database via PHPMyAdmin.
So the question is how I can configure this to work. I also don't want to allow access to the whole server (databases), access only via user name and password specified.
Thanks!
Define your user as user#[hostip-of-Php-myadmin-server] and you should be set?
It was a BIND issue, it's all fixed now.

Securely connect MS Access database front-end to MySQL back-end on web host?

We have a fairly simple M$ Access db, split into front-end (forms, reports, etc.) and back-end (tables). Currently looking for a way to get the tables with all the critical data off of one desktop and hopefully into a MySQL database on our web host, and be able to connect to it from multiple PCs (still probably only one or two people connecting to it at any give time), and eventually, hopefully, migrate to a web application when time allows. Many of the examples I've read about people connecting an Access db front-end to a MySQL back-end seem to imply that they are doing so on a LAN, probably behind a firewall, etc.
Is it at all safe to connect a M$ Access front-end to a MySQL backend when that mysql server is running on a remote web host? Does the ODBC connector take care of encryption?
TIA,
Monte
You could use putty to mount a ssh tunnel to your mysql server and redirect the remote mysql port to your machine.
Using putty is pretty straightforward:
Give it your mysql server dns name as the host and go to "Connection/SSH/Tunnels", there you define the local port to connect in the "Source Port" field (e.g. 3307).
In the the "Destination" field put the dns name of your mysql server followed by a colon and the port mysqld is running in (e.g. mysql.example.org:3306).
Save this as a profile then connect and the remote mysql port will be availbable locally on port 3307.
Just make sure you restrict the user because by default he will have an ssh shell on the server.
Setting up key authentication would also be practical because you won't have to enter a password to connect to the server (but be sure to protect your key on disk by encrypting it).
EDIT: It seems the mysql odbc connector support ssl, you could use that too but I'd personnally choose to use SSH anyway as you will have it already on your mysql server.