How to allow my team members to access my AWS mySQL database? - mysql

So I created a RDS with AWS, I shared the endpoint and port number with my team, but when they try to log onto my server they get the following:
Why can't they log in, but I can from my mySQL workbench? I logged in, created a schema, and did some insert/delete operations to test everything out. But they can't log in.
Also, they want the schema code (which I created using forward engineering) but I forgot to copy it. Is there any way to access it from mySQL workbench? The code that is created from forward engineering?

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html By default, network access is disabled for a DB instance. You can specify rules in a security group that allow access from an IP address range, port, or EC2 security group. Once ingress rules are configured, the same rules apply to all DB instances that are associated with that security group. You can specify up to 20 rules in a security group.
You need to adjust your RDS security group to allow access from your team's IP address to the port 3306

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

Linking MySql Database to Azure

I have a Database using MySql, however i want to migrate to azure MySql which i know is possible, I am new to Azure.
My question if i make changes to the local database, is it possible to automatically update the tables in azure with same changes?
I want to link both Database together and any changes effected on any will affect the other.
This functionality is available and is called Data-In replication. Please see: How to configure Azure Database for MySQL Data-in Replication for instructions on how to configure this functionality. Please see the Limitations and Considerations but the following are the requirements:
The master server version must be at least MySQL version 5.6.
The master and replica server versions must be the same. For example, both must be MySQL version 5.6 or both must be MySQL version 5.7.
Each table must have a primary key.
Master server should use the MySQL InnoDB engine.
User must have permissions to configure binary logging and create new users on the master server.
If the master server has SSL enabled, ensure the SSL CA certificate provided for the domain has been included in the mysql.az_replication_change_master stored procedure. Refer to the following examples and the master_ssl_ca parameter.
Ensure the master server's IP address has been added to the Azure Database for MySQL replica server's firewall rules. Update firewall rules using the Azure portal or Azure CLI.
Ensure the machine hosting the master server allows both inbound and outbound traffic on port 3306.
Ensure the master server has a public IP address, the DNS is publicly accessible, or has a fully qualified domain name (FQDN).

Add user to RDS instance - MySQL DB

I'm not used to AWS and how some services actually work but in this exact moment I need to add some users to a MySQL database (RDS service) and allow some IPs to access it, and if someone can help me I really appreciate.
I did some research and found that I can connect to the EC2 instance and access the CLI and that would be enough, but I can't find any running instance in any region.
Thanks for your time.
Connect to your RDS instance as the root user, and add an account just like you would with a MySQL database running anywhere else. There is no special AWS procedure here.
If the database has the "publicly accessible" flag enabled, then you just need to add the IP address to the inbound rules in the Security Group assigned to the RDS instance. If the database is not "publicly accessible" then you won't be able to give access to external IP addresses.

How can the admin add RDS MySQL db instance only reading permission to a user?

Unfortunately I'm not the admin, so I can't see the buttons, links in the AWS of him, but I need to help him doing this, because this needs for me.
I have a user "A", it can login perfectly into the RDS Mysql db instance through MySQL Workbench. But I also have a user "B", which can't login into the same RDS MySQL db instance through MySQL Workbench (the problem is not with the workbench, it also doesn't work from a c# console app. The security group of the RDS db instance contains the ip I'm trying to login, and as I mentioned, it perfectly works for the other user.
We attached the AmazonRDSFullAccess to the "B" user, but it doesn't have the rds-db JSON line which would provide the reading.
I don't know which menu points did the admin choose, but after we realized this, he created a policy attached to the RDS service and he clicked to the Read checkbox, which enabled 4-5 policies or permissions (I think this automatically generated the correct policy document), and he attached this policy the "B" user. But it still doesn't work.
Can somebody provide a step-by-step tutorial with images about what should he do?
P.S.: Sorry, if the question or the description is not well-detailed, but I can't detail that more right now. I will update later based on comments.
There are several levels of permissions here with AWS RDS MySQL database.
AWS API
Network
Database
First, AWS RDS only provisions the master account, from there you can create other users to allow Database level access to the database on the RDS instance.
You mentioned you had network level access by opening the security group of the Database to the IP you logging in from. And the AWS API access by adding the AmazonRDSFullAccess to the IAM user, this would give him access to manipulate the instance itself but NOT login to the database.
I think you'll need to get someone with DBA or the AWS admin privileges to create a user for this person so they can then log into the database.
MySQL how to add a user

How to connect with mysql of external server to generate reports in Pentaho

I want to generate reports with an external database of mysql.
Not my localhost database.
I want to generate report of mysql database of external server.
Have you ever used the Data Source Wizard?
From the Pentaho User Console, select File -> New -> Data Source.
Name the new data source.
Select "Database Table(s)" as the type.
Click the little plus circle to add a database connection.
Select the database type. Fill in host name, port, login information, and any other options. Test it if you like.
Hit Ok.
Continue with Data Source Wizard.
In order for MySQL remote access to work properly, the following needs to happen:
You have to make sure that MySQL is utilizing TCP bind on top of socket binding. Also the address it is binding to has to be accessible outside the machine (ie. not localhost)
A user needs to be created with the proper hostname and database access. DO NOT USE THE ROOT USER.
OR
You have to connect to MySQL through an SSH tunnel, if it is bound to localhost on the system, and a user needs to be created with access to the database (you shouldn't use root).
If you're not sure how to do this, I recommend you talk with your systems admin, or if this is hosted on another location, your hosting provider. In general I use the secondary option, but it's also the more difficult to setup for some users.