If you need to backup your database, you can use mysqldump command.

mysqldump -uuser -ppassword database_name > backup.sql

If you need to dump a single table, you can do the following:

mysqldump -uuser -ppassword database_name table_name > backup.sql

This should generate a bunch of Create Table and Insert Sql statements in the .sql files.

So how do you import the database from your sql dump files. Let’s say you have the backup.sql in your computer now. First thing you need to do is upload this dump to the database server. To do this, you can use scp command to copy the files and do a secure file transfer.

scp -rP port_num backup.sql root@server_name:/root/backup

After that you have to go to the mysql command tools by :

mysql -uroot -ppassword database_name

After authenticated, you run the following again to import:

source /root/backup/backup.sql

Read the rest of this entry »

In IE6, sometimes you will see an error message at the bottom saying that “Object doesn’t support this property or method”.  However, it works in firefox. The main problem lies in that in IE, any html tag’s id must be unique and can’t be the same name as any of the javascript function name or class name if you are using mootool frame work.

Example Problematic code:

HTML Tag:

Mootool Code:

var taf = new Class ({...
..)};

Solutions:

Either change class name or the div id name to avoid the conflict.
Read the rest of this entry »