AWS MySQL RDS DB instance restarted - mysql

Recently MySQL RDS DB instance restarted twice. All I see is it is switched over to a different node. I searched the logs to see if there was any information that would help me understand why it had stopped working. Following the instance restart, the general, audit, and error logs were all emptied out and started over from scratch.
Would someone kindly tell me how to -
Ascertain the cause of its restart? Since it is an automated procedure, I have no knowledge about other nodes.
Configure a cloud-watch alarm or notification before it fails over?
Thanks

Related

How to view error logs when mysql server is not starting in lampp

I am running lampp stack and I need to connect a php app it to the MySql server. But MySql database service is not starting and I have no idea why. When I look at the Application log I find no information regarding MySql after Starting MySQL Database... message.
On the other hand, the Manage Servers tab shows that the service has just stopped.
As stated earlier the main issue is that I cannot find what the problem is since the log is not providing me with any information. What can I do to figure it out? If there was an error shouldn't it be displayed in the Application log? Is there anywhere else where I can view the log in more detail?

Can't reconnect to database on MySQL Workbench

I recently set up an AWS RDS MySQL instance. I installed MySQL Workbench on my M1 Macbook, successfully connected with my credentials and started working away. The next day, I found that I was no longer connected to the database server, and upon trying to reconnect with the saved credentials - I found that I couldn't.
Unable to connect to localhost
I check the credentials about 8 times, I check the AWS Console to see if everythings okay (status is "Available"). I ended up having to delete my AWS RDS instance, uninstall workbench, and restart everything before it finally worked. I did some more work on this new database.
The next day, I found that the same thing had occurred - I was disconnected from the database server on MySQL workbench, and I could not reconnect.
Why does this keep happening? Please help, as I can't find anything about it on other stackoverflow threads.
I seem to have solved it! I just needed to add my IP address to the AWS RDS instance's "inbound rules", so that it allows traffic coming from me. That step was not described in the documentation here: https://aws.amazon.com/premiumsupport/knowledge-center/connect-rds-mysql-workbench/.
I also noticed that you have the option to allow all traffic to your database, but I figured that would probably pose some kind of security risk so I didn't do it (but perhaps not, since you still need the credentials and endpoint to access it..?).

AWS MySQL Database Disappearing

I have a MySQL database running on AWS RDS. I have a node.js server that queries the MySQL database. Everything is fine for most days but around once a week, my node server says "Unknown database."
I try to query the database with MySQL Workbench and receive the same message. I have checked my instance and it is running fine with the status being "available."
To fix the issue, I have to recreate the database which means I lose all my data.
Has anyone had issues with this? This is very frustrating since I have no idea what would cause this problem.
We‘re running MySQL RDS databases since AWS launch and never had such an issue. Are you sure the created database is really gone? Do you maybe have a job running at an interval that doesn’t work as intended? What do the RDS logs say?
To debug the issue you can
have a look at RDS server logs
enable query logging to table and analyze queries fired at the server
run a small instance which is not touched for the period to proof it’s not a RDS-related isssue
A few years later...lol. I had the same problem and realised you have to be connected to the same domain in AWS as your database. If you know the connection string of your database, find the domain it is in. Then in the top right hand side of the aws console you should see a drop down that shows the current domain you are logged into. My guess is the two are not the same. Change the value of the drop down and you should see your database.

Google Cloud SQL is now Read Only

We have an issue With Google Cloud SQL (Second Generation).
Most inserts are failing with the following error:
The MySQL server is running with the --read-only option so it cannot execute this statement.
We have made no changes. This suddenly started happening. Tried restarting the Google Cloud SQL instance but it had no effect.
Any suggestions on how we might fix quickly?
Google have fixed the problem. Their response was:
We had a problematic configuration that was directing traffic to both master and replica. The changes should have been reverted and you shouldn't see this issue anymore.
I deleted the failover replica and after a few seconds it works well again. It seems that it was a problem with the replica readonly message.
Unfortunately, this seems to happen from time to time on Google CloudSQL. We've configured an alarm that listens to this error in our logs and after restarting the application it usually starts working again.

Openfire not updating database

I have installed Openfire XMPP server on my linux machine, and everything is working fine except for one thing - for some reason there is some kind of cache mechanism that I can't figure out.
I perform changes on the admin console but the database doesn't change.
I understand there is some sort of cache involved, but how can I stop it? I have external API's querying the database, and the fact the database is not up to date is really a problem.
I am using MySQL and openfire 3.9.3
Thanks!