So your not a MySQL DBA, but you have to perform like one. If you have a production environment that’s running now, what are the first things you do when it’s not running or reported as not running?
- Are the MySQL processes running? (i.e. mysqld and mysqld_safe)
- Can you connect locally via cli?
- What’s in the MySQL error log?
- What are current MySQL threads doing? Locked? long running? how many? idle sources?
- Can you connect remotely via cli?
- Verify free diskspace?
- Verify system physical resources?
- If this is a slave, is MySQL replication running? Is it up to date?
- What is the current MySQL load, e.g. reads/writes/throughput/network/disk etc?
- What is the current InnoDB state and load? (based on if your using InnoDB)
After you do this manually more then once you should be scripting these commands to be productive for future analysis and proactive monitoring?
Is a problem obvious? Does the output look different to what a normal environment looks like? (HINT: This list is not just for when there is a problem)
So moving forward?
- Is disk/memory/cpu/network bottleneck an issue you can resolve?
- Can you improving locking statements (if applicable)?
- Can you identify, analyse and tune long running statements?
- Do you know how to restart MySQL?
- Do you know who to call when you have a non working environment?
- When did your backup last run?
- Does your last backup work?
In order to support any level of production MySQL environment you need to know the answers to these questions? If you don’t, then this is your homework checklist for MySQL DBA operations 101. There a number of resources where you can find the answers, and this help can be available online, however never assume the timeliness of responses, especially if your expecting if for FREE! Open source software can be free, open source support rarely is.