In almost all application development situations, one needs to
log debug information now and then. In almost all production
systems, one needs to log serious error events somewhere
too.
So, what can you do? Create a log table? Sprinkle your code with
SELECT 'Debug: ...' statements?
At the UDF
Repository for MySQL, we now have a solution to log messages
to the MySQL error log: a user-defined function called log_error().
Currently it is all very crude: the log_error
function takes one argument and writes it to the mysql_error log,
appending a line …
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
It's finished. After the usual two-week beta period, we can announce the new "final" XAMPP version available for public download.
In this version we updated: Apache (2.2.9), MySQL (5.0.51b), PHP (5.2.6), phpMyAdmin (2.11.7), mod_perl (2.0.4), OpenSSL (0.9.8h), and eAccelerator (0.9.5.3).
Get the downloads and more details on the specific platforms XAMPP project page.
The other day I was watching a Memcached Webinar (”Memcached for MySQL: Advanced Use Cases”) sponsored by MySQL, and it got me thinking about memcached from an operational perspective. It seems to me that the implementation patterns for memcached are fairly well codified in the standard body of knowledge. What does NOT appear to be [...]
It looks like I never blogged about it but I'm going to be speaking on OSCON 2008. Similar to the last year presentation I'll do overview of MySQL Open Source storage engines. I'll do brief overview of different storage engines available out there as well as share benchmark results for some of them.
Entry posted by peter | One comment
[Read more]
Consider these scenarios:
1. You need to test some new configurations in your my.cnf and
you need to reboot MySQL.
2. You want to run some benchmarking on your database.
3. You want to try some new replication ideas that involves
creating new replication structure, stopping the slaves, doing
failovers, or any ideas related to replication.
And, most importantly, you want to do all of the above without
disturbing your production databases.
Answer:
MySQL Sandbox. A lot of people have written about this gem but
until you have use it, you will not realize how simple and yet
valuable this tool is.
When we use a relational database system, we should know some important things. Numeric data type is very essential for a table. Here I describe some important points of Numeric Data type in MySQL:
MySQL has 9 numeric data types
- Integer: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT
- Floating Point: FLOAT, DOUBLE
- Fixed Point: DECIMAL
- Other: BIT, (ENUM maybe)
Some poor design:
- INT(1)
- BIGINT AUTO_INCREMENT
- no UNSIGNED used
- DECIMAL(31,0)
INT(1) – 1 does not mean 1 digit. (1) represents client output display format only. INT is 4 Bytes. TINYINT is 1 Byte …
[Read more]When dealing with replicated setups with two or more slaves sharing a master, it appears as if a lot of people overlook the obvious. You don't need to take your master down to resync a slave. I was hoping I wouldn't need to post about this, but I see people taking down their masters when they have perfectly healthy slaves way too often to let it slip.
|
Over the last months I have seen some impressive presentations about Open Solaris, and I wanted to give it a try. The live CD provided with opensolaris 2008.05 is very easy to install, and so I set it up in a virtual machine. The environment looks familiar for a seasoned Linux user, and thus I decided to use it as a test bed for my MySQL Sandbox, which includes a test suite that lets you run a complete test with little effort. |
|
|
Well, little effort for you, maybe, but not for the operating system. The test puts a lot of stress on the … |
So, how does one gather statistics on indexes? With InnoDB it’s one thing, with MyISAM it’s another thing. This post however, will focus on MyISAM. There are various ways, each having their own drawbacks and positive sides.
What about ANALYZE TABLE? It’s great — very fast in
InnoDB. But with MyISAM a lock occurs while scanning the table.
OPTIMIZE TABLE? Still relatively quick with MyISAM,
unless the table in question is huge. InnoDB requires an
ALTER TABLE — it might take forever, depending on
the server configuration, as OPTIMIZE TABLE for
InnoDB maps to a ALTER TABLE tableName ENGINE=InnoDB
We all know how ANALYZE TABLE, REPAIR
TABLE, and OPTIMIZE TABLE work with MyISAM.
However, there’s a less explored way, for MyISAM — the
myisam_stats_method.
…
[Read more]My copy of High Performance MySQL arrived this week! It's also Independance Day here in the States, so I have a long weekend after all the fireworks to get through my stack of reading, plus get some hill rides in to prepare for a 200K brevet July 19th. Oh, tomorrow also starts the Tour de France! What a weekend!!
MySQL DBA & Programming Blog by Mark Schoonover …
[Read more]