Saya akan mulai dengan beberapa kode kesalahan, karena saya telah menggunakan MySQL dan menemukan kesalahan yang telah saya dokumentasikan. Kadang-kadang masih teranggap ok saja pada sebagian besar waktu, vendor dapat menggunakan kode kesalahan yang sangat umum.Sebenarnya saya telah melihat beberapa vendor yang benar-benar memasukkan “generik” dalam definisi kode kesalahan atau keluarannya. Seperti kebanyakan lingkungan TI beberapa masalah / kesalahan ditangani tergantung pada konfigurasi Anda. Inilah sebabnya mengapa saya suka mendokumentasikan kode kesalahan yang saya lihat dan apa maksudnya terhadap lingkungan saya.

I/O error 2013

Terlihat dalam replikasi, terjadi ketika master tidak terjangkau oleh budak. Restart budak menggunakan svcadm untuk menghapus.

ERROR 1206 (HY000) The total number of locks exceeds the lock table size
Using InnoDB storage engine – MySQL is trying to tell you that it doesn’t have enough room to store all of the row locks that it would need to execute your query. To fix it, adjust innodb_buffer_pool_size and restart MySQL. By default, this is set to 8MB, which is too small for anyone who is using InnoDB to do anything. Setting goes in my.cnf file.
ERROR! The server quit without updating PID file (Seen when starting, something is a miss with the server)
Try removing the hostname.err file from the data directory
Try running the mysqlhome/scripts/mysql_install_db script this will reload the mysql tables (have not tested yet to see what happens to data tables)
Fetching tables hangs
Using MySQL workbench, tables show as fetching but never return (hang). This is usually caused by a table which is from a lower version of MySQL or just after an upgrade is performed. Run the /usr/local/mysql/bin/mysql_upgrade script to upgrade tables.
Nagios monitoring errors
Check to ensure updated script /usr/local/nagios/libexec/check_mysql_status.sh is in place, the path must contain /usr/local/mysql/bin or it will not find mysql command.
check to ensure it has the correct ownership of naigos with group of nagios
make sure the output file /tmp/mysql_check.tmp is also owned by nagios – if not remove it and the script will recreate it
Replication see ERROR 1396 (drop user non exist)
log into mysql on slave and issue following commands
stop slave
set global sql_slave_skip_counter = 1
start slave
show slave status \G (output should show clean replication)

Saya merasa berguna untuk memiliki tabel kalender di database. Tidak memakan banyak ruang atau mempengaruhi kinerja. Ini sangat berguna jika Anda perlu mengatur hari-hari istimewa sebagai hari libur untuk area atau perusahaan tertentu. Anda dapat menggunakannya jika Anda perlu melakukan join pada sesuatu di mana tanggal dilibatkan dan format tabel yang Anda gunakan berbeda dari yang Anda butuhkan. Saya tahu Anda bisa menyesuaikan format perintah SQL tapi terkadang lebih mudah untuk menarik dari tabel yang ada.

Create calendar table (example shows one date column from 2009-01-01 thru 2031-12-31)
use SchemaName;
truncate table TableName;
drop table ints;
CREATE TABLE ints ( i tinyint );
INSERT INTO ints VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
INSERT INTO ALL_DATES (AD_date)
SELECT date(‘2009-01-01’) + interval a.i*10000 + b.i*1000 + c.i*100 + d.i*10 + e.i day
FROM ints a JOIN ints b JOIN ints c JOIN ints d JOIN ints e
WHERE (a.i*10000 + b.i*1000 + c.i*100 + d.i*10 + e.i) <= 8399
ORDER BY 1;

Untuk pembahasan selanjutnya akan di lanjutkan di part kedua. Semoga bermanfaat.