How To Migrate Mantis Defect Tracking System From Windows To Linux / Fedora Core 6May 12th, 2007 Mantis is popular php based defect tracking application which works on top of RDBMS like MySQL and PostgreSQL. Recently I ported our Windows based Mantis installation to Linux.
How To Copy Master Boot Record (MBR) Between Hard DisksMarch 18th, 2008 In Linux you can use the dd command to copy MBR from one hard disk to another. You can also use dd to backup your master boot record to a different (or same) media.
How to start/stop MySQL server on LinuxJanuary 7th, 2005 # To Start MySQL Server
/sbin/service mysqld start
# To Stop MySQL Server
/sbin/service mysqld stop
# To Restart MySQL Server
/sbin/service mysqld restart
And of course there is the brute force way to kill all the processes:
$ for i in `ps -ef |grep mysqld |awk '{print $2}'`; do `kill -9 $i`; done
Thanks to Anthony Eden for the comment (below) to remove the dot in front. A simpler alternative is:
pkill mysqld
This will kill the mysqld process.
Tip: How To Find MySQL VersionSeptember 1st, 2007 Try:
mysql -e status|grep 'Server version'
If that doesn't work then use:
mysql -u root -p -e status|grep 'Server version'
Provide root password when prompted. Default root password for MySQL is empty string, so just pressing enter when prompted for password will suffice by default.
Solution: MySQL Master-Master Replication Fails With ERROR 1200 (HY000) on MasterNovember 16th, 2007 When you try MySQL master-master replication with two (or more) servers you may often find that in the process of configuring the original master to also act as a slave server (start slave), it fails with the following error:
mysql> start slave;
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO
To rectify it locate and delete the master.info file and restart the mysql server. Now try to start slave and it should work.
6 MySQL Database Replication TipsNovember 18th, 2007 Replicating on two or more MySQL master database servers
1. MySQL Master-Master Replication Fails With ERROR 1200 (HY000) on Master
2.
How To Rapidly Clean / Wipe Hard Disk DriveApril 6th, 2008 How to overwrite your hard disk with random characters
dd if=/dev/random of=/dev/sda
How to overwrite your hard disk with zero characters
dd if=/dev/random of=/dev/sda
Replace sda / hda with your hard disk identifier. Either of the procedure requires the system has Linux installed or accessible from Linux operating system.
MySQL Tip: How To Check, Repair & Optimize All Tables in All DatabasesApril 20th, 2008 Here is a simple command to auto repair, check and optimize all the tables in all databases running on a MySQL server:
mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
mysqlcheck is available in MySQL 3.23.38 and later. mysqlcheck uses the SQL statements CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE in a convenient way for the user.
Need for Dedicated Server Management APIAugust 12th, 2007 One of the main challenges of managing multiple dedicated web / database servers is the ability to centrally monitor and manage them, automate tasks which requires out-of-band access like rebooting the server or find out if the server is dying and arrange for replacement ahead of time etc. Unless you are a very big web service provider, chances are you are using dedicated servers from one or more of dedicated web hosting providers.
Comparison of Software RAID on Windows versus LinuxFebruary 18th, 2007 The basic idea of RAID (Redundant Arrays of Inexpensive Disks) is to combine multiple small, independent disk drives into an array of disk drives which yields performance and recoverability exceeding that of a Single Large Expensive Drive (SLED). Redundancy is also provided (unless RAID 0) which allows easy and often automatic recovery from hard disk crash.
How To Enable/ Disable Auto Reconnect in MySQLJuly 20th, 2007 What is auto reconnect in MySQL?
The MySQL client library can perform an automatic reconnect to the server if it finds that the connection is down when you attempt to send a statement to the server to be executed. In this case, the library tries once to reconnect to the server and send the statement again.
How To Test Master-Master / Master-Slave / Standard / Circular Replication on MySQLSeptember 1st, 2007 Working with replication systems is not easy. Learning and testing different kind of MySQL replications and fine-tuning it to your specific needs is a time-consuming endeavor.
MySQL Tip: MySQL Server Has Gone Away Or Lost connection to server during query FixJuly 24th, 2007 A much dreaded MySQL error message during queries is "MySQL server has gone away". An alternative message is "Lost connection to server during query".
Apache Web Server Suddenly Fails to Load With EMalloc Error - Solution (php_exif.dll)June 1st, 2006 The common symptom of the problem is that Apache web server suddenly fails to load as a service (on windows) or even from command line. The error message from log is as follows:
FATAL: emalloc(): Unable to allocate -2103443420 bytes
[Thu Jun 01 23:57:21 2006] [crit] master_main: create child process failed.
Relational Database Management System to use for Enterprise Software DevelopmentAugust 9th, 2005 As an architect I have often been asked this question by my clients, friends and at work. I would like to answer it briefly once and for all.
October 31st, 2006 at 3:23 am
Maybe it’s outdated but I just bumped into this post. This happend to me twice in the last 6 months. Both time it was caused by the multiple hard disk/file system errors. “mount -o remount,rw /data” nor “hdparm -r 0 /dev/hdaX” helped as it does not clear the errors, only reboot did. I am not sure if the error was caused by hardware or software error but I changed the discs anyway, the data was to sensitive to risk loosing it.
May 6th, 2007 at 6:24 pm
I’ve had this problem a few times now, but only on hosts running inside VMWare. Eg we have some mysql servers as virtual servers inside the VMWare environment and every now and then it gets set to read-only.
I have no idea of any resolution yet.