Is Deterministic MySQL Data Read function allowed in Amazon Web Services? - mysql

I tried to create a deterministic, MySQL data read function in my database on a shared hosting in GoDaddy (Linux). But while creating the function I got the following error.
#1419 - You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
I have contacted GoDaddy Tech Support and they mentioned that I need Super User privilege to do this and they won't be able to grant that to me on a shared hosting. So I am planning to move everything to Amazon Web Services.
Before I do, does anyone know if Amazon RDS will allow the creation of this MySQL function or is there any possibility I can run into the same problems there as well? I had run into the same problem creating DB Triggers on Godaddy as well and worked around using Stored Procedure.
Thanks for your help.

Yes I know for a fact that you can change the log_bin_trust_function_creators parameter in Amazon RDS.
RDS has a thing called parameter groups. If you want to change a setting, you create a new parameter group, change the parameters you want (in this case, set log_bin_trust_function_creators to 1) and then launch an instance (or modify an already launched instance) and set the instance's parameter group to the one you just created.
Hope this helps.

Related

Can't connect database software to AWS RDS

After spending hours trying to debug this problem, I've come out empty-handed.
I'm new to AWS, so it's possible I might be missing something here, but it seems I've exhausted all possibilities based on what I've read online.
So the idea is, I want to create a RDS instance. I'm new to cloud computing as a whole, but how I understand it, this instance is essentially the storage of my relational database on the cloud. Then I connect the DBMS of my liking to it on my local machine. I tried with both Postgresql and MySQL, but both ran into the same issue. Note, when I say I used the two aforementioned DB engines, I made sure that in each case, I set them as the engine when creating the RDS instance. I then configured the security group accordingly.
What I've done:
I've created an admin user as per the aws docs.
I created a security group in the VPC that has the following inbound rule (In this case, I intend to create a RDS instance with MySQL as the engine):
I created an RDS instance with MySQL as the engine, made sure it had public accessibility, and made sure the security group of the VPC was the one I created.
I then tried connecting to the database via both MySQL Workbench and pgAdmin, but both ran into the same issue. I tried using my IP as the source for the security group inbound rule – that didn't work. I then set the source to 0.0.0.0/0, which I understand is all sources; that also unfortunately didn't work.
Any ideas what else I could be doing wrong here? Thanks.
Well, seems I managed to figure it out, albeit indirectly.
I gave up working with AWS and decided to try MongoDB. When connecting to MongoDB Atlas, once again, I couldn't connect. I read up the troubleshooting page in the docs and saw that they recommend you use an outgoing port tester to check if you can reach them from the port they use (27017 in their case). I tested it and found that it wasn't working. I checked to see if it had to do with my firewall (I'm on mac); I disabled it but it didn't do anything. I disabled my VPN (ProtonVPN) and it turned out that it was what was causing the issue. But that's not all there is to it. Although the outgoing port test was working, I still couldn't successfully connect to the DB. So I went to configure the inbound IP address rules so that it would accept from any source, and that was the final fix needed.

Is there a way to change the permissions required for a Stored Procedure via mysqlworkbench?

I am trying to create a stored procedure with MYSQL for Visual Studio2019. I wrote a little "stub" just to make sure that I can develop it before I start writing the real code.
I have connected to the database (it is up on RDS) and I can see it in the Server Explorer. When I try debugging it with Debug Mysql Routine I get an Error while debugging. Access denied you need SUPER, SYSTEM...
So I see I can do this with GRANT EXECUTE... But where do I run this? I don't have access to a CLI on the RDS server? Is there some way to set this up in either Mysql for benchVS2019 or in Mysql Workbench?
I managed to solve this myself. I first needed to load mysql onto the EC2 instance I am using. Once I did that I was able to GRANT PRIVILEGES.

MySQL is hiding my Routines (stored procedures)

After creating a couple of Routines in MySQL, I came back to my database and they were missing, but still showing the name.
It says that I might be lacking the privileges necessary to edit them, but that is not the case. I am logged in with the same account that created them, which is an admin account.
To see if they were in the information_schema, I ran this:
SELECT routine_definition
FROM information_schema.routines
WHERE routine_schema = 'databasename';
...but it shows two null entries.
Are my Routines completely gone? Did I do something wrong when creating them?
I've used MySQL for years and haven't had this happen before.
EDIT:
I just called the Routines and they do work... meaning they return the data. My only issue is that I cannot view or edit the code.
In Motion Hosting responded with an explanation.
Unfortunately due to the recent changes by cPanel, use of MySQL routine is not something that is officially supported on a shared hosting plan. While it may be possible to manually create it through a custom phpMyAdmin install via your cPanel credential, the interface provided by cPanel will no longer work to modify routines. If you need support for routines, you will need to upgrade to a VPS or higher plan.
From what I understand, MySQL sets the security of the routine to "DEFINER" which identifies you by your login. Once you log out and back in, that ID has changed, thereby hiding your routine code.
Similarly, the routines do not show up in a MySQL backup, either.
Depending on which hosting service you are using. Although I have researched several times on Google, I have not found any solution that works for me.
As soon as I log in with cpanel -> phpmyadmin I am unable to run routines.
I am unable to edit and export routines
Solution :
Log in as the root user of whm
From the left menu bar, search for phpmyadmin Access to PHPMyAdmin's root account
Routines will be accessible to you routine access

configuring max_allowed_packet for Confluence on AWS

I have set up Confluence on a LAMP stack on an AWS instance and need to be able to adjust the max_allowed_packet to install addons. I know AWS prohibits editing the my.cnf file and I've installed the RDS client. RDS doesn't seem to see my existing confluence MySQL database for me to assign it to a db group with the larger packet allowance.
Am I missing some option for RDS to see it? Is there another way to do this?
You can adjust max_allowed_packet by modifying an existing, or creating a new RDS parameter group. You will find many familiar configuration settings in parameter groups. If you haven't touched parameter groups before, you'll likely find that yours is named default.mysql5.6 (or your version equivalent) and you will need to create a new one to customize your own settings.
You can create a new parameter group from the:
AWS Console ("Working with parameter groups" describes the creation of parameter groups and modification of individual settings)
CLI (docs: create-db-parameter-group)
API (docs: CreateDBParameterGroup)
You can modify settings from the:
AWS Console (See above.)
CLI (docs: modify-db-parameter-group)
API (docs: ModifyDBParameterGroup)
When you change from the default parameter group to a custom parameter group, you will need to reboot the RDS instance for the switch to take effect. After that, you will only need to reboot for individual settings if they have the "static" parameter type. max_allowed_packet is a dynamic parameter type, which means that the change will take effect immediately once you make it.

Can I run my own instance of MySQL?

I'm trying to migrate a web site to friend's server. The site uses MySQL, but he didn't previously have it set up. He's installed the package now and suggested that I could run my own instance of it. I'm at a loss for how to do so. Is it even possible? If so, how?
Some relevant information:
The OS in use is CentOS 5.9
Using MySQL 5.0.95
I only need the DB to be read locally via PHP when serving my site.
I have no root privileges on this system (although a full shell), but am close friends with the owner/administrator if that's necessary.
To clarify:
It's the daemon that I want to run my own instance of. So I guess what I want to know is if it's possible to have multiple users on the system running their own instances of mysqld containing different databases.
All I need this for is serving a web page. If I have to break down and switch to a pseudo-database using CSV files I will, but I'd much rather stick to MySQL if I can.
If MYSQL is setup on that machine yes you can run your own instance of it.
You can have it set up and your site given its on Database within that MYSQL instance and that specific MYSQL account can be used to access the tables etc. involved with your website.
Now if he is only putting MYSQL on the machine then having you set everything up you will just need an account for MYSQL and from ther eyou can get in and just create all the needed items that will allow your site to fully function.
EDIT
In response to your comment. You can you just can't clog the same port or have configurations that conflict each other. As long as it won't be to much of a performance hit and you configure a different user to start each instance you should be able to do Something like this.