Archive - mysql RSS Feed

monitor mysql using snmp

Monitoring mysql over snmp has various advantages, one being that you can write snmp plugins and feed them onto cacti or nagios, secondly it is less resource intensive. as SNMP works over UDP. The mysql-snmp is based on NetSNMP and connects to the remote mysql server.

First download the mysql-snmp on your remote mysql server

1
[root@fedora local]# git clone git://github.com/masterzen/mysql-snmp.git
1
2
[root@fedora local]# cd mysql-snmp
[root@fedora local]# make install

Next we configure “/etc/snmp/snmpd.conf” with the following values
Continue Reading…

 

how to fix a corrupt mysql table

recently the mysql on bacula crashed with this error message

log:2010-11-04 20:16:22lb01-dir JobId 9942: Fatal error: sql_create.c:801 Lock Filename table Query failed: LOCK TABLES Filename write, batch write, Filename as f write: ERR=Table ‘./bacula/Filename’ is marked as crashed and should be repaired

you can check the database and find out which tables are corrupt

mysqlcheck –databases bacula -p

and repair it using Continue Reading…

 

how to use mysql foreign key

Unlike primary key, the foreign key establishes a relationship between two tables. The default MyISAM table type does not support foreign keys so we will use InnoDB table type.

Example: We will establish a relationship between two tables

Continue Reading…

 

reset mysql root password

First things first. Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords.
Continue Reading…

 
Page 1 of 11
Theme Tweaker by Unreal