How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog

MySQL database server generates binary log files for every transaction to the databases, provided administrator does not disable or comment out the “log-bin” parameter in my.cny configuration file. The binary log files are written in binary format. Although the binary logs, or also known as logbin are mainly used for MySQL database replication purpose, sometimes you may need to examine or read the contents of […]

Read Me 8 Comments

Check and Optimize MySQL Database Automatically with Crontab/Cron

MySQL is a very popular free yet powerful database system. But even in great databases, the tables may get fragmented with overhead due to continuous update, or delete and insert operation on data stored in database. Beside, it’s also possibility that the databases may get corrupted. Thus, performing health check on database and optimize MySQL server regularly is an important task.

Read Me 12 Comments

How to Rename or Move Oracle Tablespace Datafile to Another Location

Oracle database does not provide an easy user interface to rename a datafile of tablespace, nor database administrator can easily move or relocate the datafile to another location or directory that different from original location on creation of database. The rename or move place task has to be performed via Oracle SQLPlus command line interface. However, if the operation is performed when the tablespace which […]

Read Me 2 Comments

How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile

Accident may happens, even though it’s costly one. This is especially the case in Oracle database, which stores the database objects physically in data files on hard disk. Fast hand administrators may accidentally delete some of the datafiles, or the datafiles may get corrupted or unreadable on hard disk failure. You may get also some missing datafiles after database recovery process. In any case, missing […]

Read Me 20 Comments

How to Remove and Drop Datafiles from Tablespace in Oracle Database

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. The datafiles are added to the tablespaces as database space requirement grows bigger. However, there are several reasons you may want to remove or delete data files from a tablespace. Such as accidentally add a wrongly sized or unwanted datafile to a tablespace, or the data […]

Read Me 1 Comment

How to Backup and Restore (Export and Import) MySQL Databases Tutorial

phpMyAdmin can be used to export or backup MySQL databases easily. However, if the database size is very big, it probably won’t be a good idea. phpMyAdmin allows users to save database dump as file or display on screen, which involves exporting SQL statements from the server, and transmitting the data across slower network connection or Internet to user’s computer. This process slow the exporting […]

Read Me 41 Comments

Make Website and WebApp Compatible with iPhone and Blackberry

Most websites and web pages will be compatible and work fine on iPhone and Blackberry. However, it’s still possible to make the web sites more supportive, ready and friendly to Apple iPhone by giving more information to iPhone about how the webpage should be displayed on the iPhone browser. Beside, for web sites that try to emulate the functionality of the built-in iPhone applications such […]

Read Me 14 Comments

MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Without a Key Length

When creating a new table or altering an existing table with primary keys, unique constraints and indexes, or when defining a new index with Alter Table manipulation statement in MySQL database, the following error may occur and prohibit the the command from completing: ERROR 1170 (42000): BLOB/TEXT column ‘field_name’ used in key specification without a key length

Read Me 19 Comments

How Your Cursor Works

Ever wonder how your mouse connects to the cursor and moves it around your screen? Believe it or not, I found a website that explains this technical process clearly thanks to a giant digital magnifying glass.

Read Me 3 Comments

CPAN Missing Parameter auto_commit Message

Perl programmers or system that using CPAN (Comprehensive Perl Archive Network) extensive list of modules or distributions may occasionally has the following message shown in log file, especially when using script that acts as a package manager or automated update script such as in the case of upcp script for cPanel WebHost Manager hosting server:

Read Me Leave comment

Remove or Trim First or Last Few Characters in MySQL Database with SQL

Another useful string function in MySQL database is TRIM() which will return a text string after removing the matching leading or trailing characters, also known as prefixes or suffixes. It’s been described by MySQL reference as function that returns the string str with all remstr prefixes or suffixes removed. If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed. remstr is […]

Read Me 6 Comments

How to Find and Replace Text in MySQL Database using SQL

MySQL database has a handy and simple string function REPLACE() that allows table data with the matching string (from_string) to be replaced by new string (to_string). This is useful if there is need to search and replace a text string which affects many records or rows, such as change of company name, postcode, URL or spelling mistake.

Read Me 83 Comments