Joomla TemplatesWeb HostingWeb Hosting

Debian

Repair Corrupt Table

mysql: Table 'database/table' is marked as crashed and should be repaired

To fix this, I ran this command via a shell:

$ mysqlcheck --all-databases -uroot -p

enter the root password, and it goes through checking all database tables for issues. hopefully fixing along the way :)

You may have to change root to whatever database username you have available (ie: whatever you use to login to phpmyadmin)

It any show the error, run this sql:

 

$ mysql -uroot -p databasename
  REPAIR TABLE tablename;

Or just jump into phpmyadmin and click on repair

Terakhir dikemaskini (Selasa, 31 Januari 2012 22:44)

 

format usb pen drive

fdisk /dev/sda
Command (m for help): p

Disk /dev/sda: 128 MB, 128974848 bytes
4 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 248 * 512 = 126976 bytes

Device Boot      Start         End      Blocks   Id  System

Command: n “Create new partition!”
p “Create primary partition!”
Partition number (1-4): 1
First cylinder: (enter for default)
Last cylinder:  (enter for default)
Command: t
Hex code (type L to list codes): b
Command: a “Make partition #1 active!”
Partition number (1-4): 1
Command: p

Disk /dev/sda: 128 MB, 128974848 bytes
4 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 248 * 512 = 126976 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1015      125829    b  FAT32

Command: w “Write table to disk and exit!”

Format the USB drive with a FAT filesystem.

mkdosfs -F 32 /dev/sda1 “It will work with FAT32?

 

Grub Install for Sarge

Install Grub on the Alternate Boot Drives- usefull for remote disk backup/upgrade

Once you’ve successfully booted your new system for the first time, you will want to install Grub onto the other two disks (or on the other disk if you have only 2 HDDs) so that, in the event of disk failure, the system can be booted from another drive. Log in to your new system as root and do:

# grub
grub> device (hd0) /dev/hdb
grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd0) /dev/hdc
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

 

delete duplicate row

from http://www.justin-cook.com/wp/2006/12/12/remove-duplicate-entries-rows-a-mysql-database-table/

 

This is an extremely quick and painless way to remove duplicate rows (tuples) from a MySQL database table. The best part of it is that it requires no programming or PHP coding whatsoever, it can all be done with three manual SQL queries! Note: this only works on MySQL 3.23 and above. But I have a hard time imagining anyone running an older version than that anyways!

So, there are 3 steps, and therefore 3 SQL statements:

Step 1: Move the non duplicates (unique tuples) into a temporary table


CREATE TABLE new_table as
SELECT * FROM old_table WHERE 1 GROUP BY 

Step 2: delete delete the old table
We no longer need the table with all the duplicate entries, so drop it!


DROP TABLE old_table;

Step 3: rename the new_table to the name of the old_table


RENAME TABLE new_table TO old_table;

And of course, don't forget to fix your buggy code to stop inserting duplicates!


 

speed up linux router

http://www.cyberciti.biz/faq/gentoo-centos-rhel-debian-fedora-increasing-txqueuelen/

 
Artikel lain...
Joomla templates and extensions Your ad here Your ad here Your ad here Your ad here Your ad here Your ad here Your ad here
Hadith 14
Daripada lbnu Mas'uud r.a. beliau berkata: Rasulullah SAW telah bersabda:

Darah seseorang muslim tidak halal kecuali dengan salah satu dari tiga perkara; janda yang berzina, nyawa dengan nyawa dan orang yang meninggalkan agamanya yang memisahkan diri daripada jamaah.

Hadith riwayat Bukhari dan Muslim.
AJ Article Listing
Galeri YouTube Terpilih