You are here: Home >Posts Tagged ‘MySQL Database

Optimize All Tables In A MySQL Database

Description If you have a database driven site and you want to optimize MySQL tables then this is perfect. It goes through all the tables in a MySQL database and does table optimization on each one using the MySQL Optimize Table syntax.

Tags: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Back Up and Restore a MySQL Database

การสำรองข้อมูลดาต้าเบส MySQL ปกติทั่วไปจะทำการ Backup MySQL ผ่าน phpMyAdmin แต่เนื่องด้วย phpMyAdmin มีข้อจำกัดเรื่องเวลาขนาดของข้อมูลที่มีขนาดใหญ่มากๆ ลองมาใช้ mysqldump เพราะน่าจะเป็นคำตอบที่ดีกว่า

Tags: , , , , , , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to – Using PHP To Backup MySQL Database

Execute a database backup query from PHP file. Below is an example of using SELECT INTO OUTFILE query for creating table backup <?php include ‘config.php’; include ‘opendb.php’; $tableName  = ‘mypet’; $backupFile = ‘backup/mypet.sql’; $query      = “SELECT * INTO OUTFILE ‘$backupFile’ FROM $tableName”; $result = mysql_query($query); include ‘closedb.php’; ?> To restore the backup you just need [...]

Tags: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS