RSS
people

Check MySQL database size

How to check MySQL database size in your server? 
Actually MySQL already provide the information, what you need to do is just do a simple query to retrieve the data.

Below is the query :

read more »

3 Comments | Tags: ,

MySQL table corrupt & repair

Recently I am trying to dump a customer MySQL database to a SQL file & restore to another server.
An error occur during the dump process.

The error mention that one of the table in the database is crashed & repair required.
Then I try to login into MySQL server & use the particular database & execute the “DESC” command.
The result is “ERROR 145 (HY000): Table ‘./XXXXXXX/tracker’ is marked as crashed and should be repaired”

mysql> desc tracker;
ERROR 145 (HY000): Table './XXXXXXX/tracker' is marked as crashed and should be repaired
mysql> check table tracker;
+----------------------+-------+----------+----------------------------------------------------------------------------+
| Table                | Op    | Msg_type | Msg_text                                                                   |
+----------------------+-------+----------+----------------------------------------------------------------------------+
| XXXXXXX.tracker      | check | error    | Table './XXXXXXXXX/tracker' is marked as crashed and should be repaired |
+----------------------+-------+----------+----------------------------------------------------------------------------+
1 row in set (0.03 sec)

read more »

4 Comments | Tags:

MySQL server has gone away

Today I am trying to restore one of MySQL dump into my development database.
While I executing the mysql -uroot -p XXXX < XXXX.sql, the restoration show me the error of ”ERROR 2006 (HY000) at line 3051: MySQL server has gone away“.

Then I double check on the database that I restore, I found that the action terminated in the middle & some of the tables & data is not restored.

I googled a while & found the solution.

read more »

No Comments | Tags: , ,

How to reset MySQL root password

As a database administrator, you might forget the root password for your database. It is a serious problem. This tutorial is to teach you how to reset the root password if you forget it.

read more »

3 Comments | Tags: , ,