Page 1 of 1

Need help for monitoring mysql database

PostPosted: Fri Jul 22, 2022 7:13 am
by infraprivy
Hi all

Need help for monitoring mysql database memory usage, disk usage and cpu load in google cloud mysql, any plugins to do that?

Thanks

Re: Need help for monitoring mysql database

PostPosted: Mon Jul 25, 2022 4:43 am
by PhumeleleSJose96
I'm not familiar with MySQL, but you will probably end up having to poll the database to do this. You'll probably end up with some timer based code that will go check the database at a particular interval.

However, you can do your best to minimize the amount of work done on each check. A bad way to do this would be to retrieve the whole table each time and run a whole bunch of checks and comparisons in the program.

Instead, you could use triggers (and here's the syntax to create one) to know when a row was updated or inserted. How you use the triggers is up to you.

One alternative would be to have a timestamp column on the table that automatically updates whenever there's an insert or update. Similarly you could have a separate table with just the primary key and the same timestamp column (if you don't want to clutter up your main table with extra columns).

Either way, you would keep track of the timestamp you last checked at, and find everything that was inserted or echatspin echatrandom updated after that point in time.

Re: Need help for monitoring mysql database

PostPosted: Wed Jul 27, 2022 11:36 pm
by FlanZarianick
Perhaps add Insert, Update, Delete triggers to the table to log row in a new table with two columns..

uid of row changed
type of change insert/update/delete
Then you access this table and it tells you the specifically which rows were omegle shagle voojio inserted, updated, deleted

Re: Need help for monitoring mysql database

PostPosted: Thu Aug 04, 2022 5:37 am
by EdwardSMaTeresa
I'm not familiar with MySQL, but you will probably end up having to poll the database to do this. You'll probably end up with some timer based code that will go check the database at a particular interval.

However, you can do your best to minimize the amount of work done on each check. A bad way to do this would be to retrieve the whole table each time and run a whole bunch of checks and comparisons in the program.

Instead, you could use triggers (and here's the syntax to create one) to know when a row was updated or inserted. How you use the triggers is up to you.

One alternative would be to have a timestamp column on the table that automatically updates whenever there's an insert or update. Similarly you could have a separate table with just the primary key and the same timestamp column (if you don't want to clutter up your main table with extra columns).

Either way, you would keep track omegle.2yu.co of the timestamp you last checked at, and find everything that was inserted omeglz echat or updated after that point in time.