Archive for » November 16th, 2009«

How to repair mysql database table manually?

You can repair the database table manually from shell by using following command.

root@gunjan[~]mysql>mysql –u databaseusername –p databasename

For example if we are using database gunjan_db

root@gunjan[~]mysql

mysql> use gunjan_db;
Database changed

mysql> show tables;

+———————————————+
| Tables_in_gunjan_db              |
+———————————————+
| additional_images
| address_book
| address_format
| administrators
| banners
| banners_history
| cache
| categories
| categories_description
| configuration
| configuration_group

| counter

| orders_products
| orders_products_attributes
| orders_products_download
| c
| orders_status_history
| orders_total

For example we need to repair table orders_status

mysql> repair table orders_status;
+————————————+——–+———-+———-+
| Table                              | Op     | Msg_type | Msg_text |
+————————————+——–+———-+———-+
| gunjan_db.orders_status | repair | status   | OK       |
+————————————+——–+———-+———-+
1 row in set (0.11 sec)

mysql> q
Bye

How to disable local-mail delivery for one domain name?

You can disable local-mail delivery for one  domain name from your shell and follow the instructions..

First go to file
root@gunjan[~]#vi /etc/localdomains
Then select the domain name give them comment# or remove it and save the file
:wq!

Second step go to file
root@gunjan[~]#vi /etc/remotedomains
and add the domain name we have comment or removed in the above file
:wq!

Basically when ever we use external mail server at that time we need to remove domains entry from /etc/localdomains file and add it in /etc/remotedomains file