DBA Lounge

How to recreate an InnoDB table after the tablespace has been removed

Does your error log ever get flooded with errors like this one? [ERROR] MySQL is trying to open a table handle but the .ibd file for table my_schema/my_logging_table doesnot exist. Have you deleted the .ibd file from thedatabase directory under the MySQL datadir, or have you used DISCARD TABLESPACE? See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html how you can resolve…

Getting a List of Users From the MySQL General Log

From time to time, organizations want to know if there are any users that are not used. For clients using MySQL 5.1 and up, that can handle a 1% overhead for general logging, we will enable the general log for a period of time and analyze the users that connect. Note: we have some extremely…

PalominoDB Percona Live: London Slides are up!

Percona Live: London was a rousing success for PalominoDB.  I was sad that I could not attend, but I got a few people who sent “hellos” to me via my coworkers.  But on to the most important stuff — slides from our presentations are online! René Cannao spoke about MySQL Backup and Recovery Tools and Techniques (description) – slides (PDF)…

Taming Pod::Weaver, part 2

In our last episode, we began our journey into the wonderful and only slightly scary world of Pod::Weaver. By the end of the blog entry, we victorously managed to, hum, mimic perldoc -u. Not terribly impressive, maybe, but a necessary baseline for the upcoming niftiness. Niftiness that begins with today’s installment, as we are going to take a closer look at all the Pod::Weaver gnomes and fairies that we can enlist to help create our POD.

Automatic Downtimes in Nagios Without Using Time Periods

Monitoring systems are a great thing, and we rely heavily on Nagios here at PalominoDB.  We also rely heavily on xtrabackup for (mostly) non-locking, “warm” backups of MySQL.  In order to get a consistent backup with a proper binlog position on a slave, xtrabackup stops replication for a short period of time.  If the monitoring system…

Exporting the mysql.slow_log table into slow query log format

Using pt-query-digest is an excellent way to perform a SQL review. However, sometimes you don’t have access to the slow_query_log_file. For example, when MySQL runs on Amazon RDS, the slow_query_log_file is unavailable (see the RDS FAQ). To get around this, export the mysql.slow_log table. To export the data, run the following SQL command from an…

Important Caveats When Using pt-online-schema-change

Using pt-online-schema-change is a great way to change a table without downtime or switching over to a secondary database first. While using it on production systems, we found some interesting issues to consider. 1) There were foreign_keys referencing the table we were altering. There are two options to handle this. They are specified with “–update-foreign-keys-method…

Taming Pod::Weaver

Pod::Weaver, which does to POD what Dist::Zilla does to distribution files, is all that, only moreso. But it feels so powerful, holds so much promises to make my life easier once I manage to master it, that I won’t let the steep learning curve deter me. I’ll climb down my brain bicycle, and push it up that hill. And I’ll provide a running (well, walking slowly) commentary as I go along, in the hope that it’ll help other peeps who might want to venture is those exciting yet dark waters. Okay. Enough preamble. Let’s get cracking.

The Magic of kSar for one-time system graphs

I forget from whom I first learned about kSar, but I am in debt to that person once again.  I first learned about it about a year ago, and it has been extremely useful whenever I am trying to debug system where I do not have access to trending graphs.  kSar is an open source…

Page 19 of 67« First Page...10...1718192021...30...Last Page »