Clear command doesn’t work for clear the screen in MySQL

I was very much confused when I have tried to clear the screen of MySQL and I didn’t got any result. root@nilnandan-Satellite-A200:~# mysql -uroot -p Enter password: Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement. mysql> show databases; +——————–+ | Database           | +——————–+ | information_schema | | mysql              |…

How FLUSH TABLES works in MySQL

“FLUSH TABLES” is generally used for closing all tables by force in MySQL. Its really interesting that how mysql do this. Most of time we are doing this because someone adds new tables outside of MySQL. (Like for MyISAM tables, we are copying .FRM, .MYD and .MYI files. We can do this when MySQL is…

How caches used in MySQL

Following caches are generally available in MySQL. Key Cache This is a shared cache for all B-tree index blocks which are in different MYI files. Internally, this cache is using hashing and reverse linked lists algorithm for quick caching for most recently used blocks and flushed the blocks which are not recently used or some…

Postgres Plus 8.4 vs. MySQL 5.5

Nice comparison by EnterpriseDB. http://get.enterprisedb.com/whitepapers/Postgres_Plus_8.4_vs_MySQL_5.5.pdf Below Topics are included in this comparison. General Comparison Commentary Core Database Features Database Capacities Transaction Programming and Control Query Capabilities Business Intelligence and Data Warehousing Network/Distributed Services Bulk Data Management/Protection Security Features DBA Tools Developer Functionality Scalability Solutions High Availability Solutions Here, one more link which can help to…

Why server id important in MySQL Replication

Set server id in my.cnf is one of the necessary steps to implement or start replication. The general rule is, server id must be unique across the environment where we are implementing MySQL replication. Generally while implementing multi-master/circular replication, we are setting option –log-slave-updates= 1. so when any statement of master will be executed on…

How to use mysql_upgrade script

There are 2 kind of upgrade is possible in MySQL.     Major version upgrade (i.e MySQL 4.1 to MySQL 5.0)     Minor version upgrade (i.e MySQL 5.0.45 to MySQL 5.0.47) In the Major version upgrade, people are generally using very common technique which is, taking backup by mysqldump from MySQL 4.1 and reload into MySQL…

Indexes in MySQL

There are several types of indexes are available in MySQL: B-Tree Indexes: Normal Indexes – Normal indexes are the most basic indexes, and have no restraints such as uniqueness. It can contain duplicate value. Unique Indexes – Unique indexes are the same as “Normal” indexes with one difference: all values of the indexed column(s) must…

How heartbeat helpful for MySQL Replication

Heartbeat is a project from Linux-HA. http://www.linux-ha.org/wiki/Heartbeat. Heartbeat will be helpful when we would have pair and/or more servers which are configured to replicate in circular fashion. I.e  In MySQL Replication, if master will be fail we have to do manually failover or we have to make script which will manage this thing. But if…

How to install MySQL 5.1 on Ubuntu 10.10

Its easy to install MySQL on ubuntu but you must have updated your repository for apt-get utility. If you haven’t than run below command to update it. shell> apt-get update After that, to install MySQL 5.1 on ubuntu run below command. shell>sudo apt-get install mysql-server-5.1 you’ll have to give your password so it will start…

How to enable compositing in ubuntu 10.10

Some time after installing of ubuntu, we are getting errors with visual effects/any dock tools like docky or AWN/ubuntu themes. i.e “You need to unable Desktop Effects (Compositer) to apply and customise themes. Following are the simple steps to get rid out of that error. Press Alt-F2 to open the “Run Application” box / Open…