skip to content

Database

How to Rename a MySQL Table Column That is a Reserved Word

If you inadvertedly created a table with a column name that 's a reserved word, you will find it not so convenience to use. To rename the column, you can't do something like

mysql> ALTER TABLE table_name CHANGE COLUMN reserved_word new_column_name varchar(255);

Instead, you have to it this way:

mysql> ALTER TABLE `table_name` CHANGE COLUMN `table_name`.`reserved_word` `table_name`.`new_column_name` varchar(255);

 

MySQL InnoDB Error "the table is full"

http://dev.mysql.com/doc/refman/5.0/en/full-table.html explains some common causes for the error "the table is full" and tells how to fix it.

If you are using MySQL InnoDB, and the file limit isn't reaching the maximum file size limit by the operation system, then check your my.cnf config file, and look for a line like

innodb_data_file_path = ibdata1:10M:autoextend:max:128M

Increase the "max:128M" to something bigger, such as "max:526M".

If you want to increase the innodb_log_file_size, do this:

Use TCMalloc to Improve MySQL Service

Someone recommended this article to me: http://www.javayou.com/diary/18368. TCMalloc is explained here TCMalloc : Thread-Caching Malloc, and you can download libunwind from The libunwind project.

Then do the following to install:

MySQL Data Types - Data Length

Reference this page http://dev.mysql.com/doc/refman/5.0/en/data-types.html, and in particular, the storage requirement page http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html

 

Storage Requirements for String Types

Syndicate content
Powered by Drupal.