FATAL: failed to initialize database driver! with Sysnbech 0.4.X

Recently, I came through with this error. It was weird because I have never seen this error earlier. [root@percona-pxc55-1 nilnandan]# sysbench –test=oltp –oltp-table-size=1000000 –mysql-db=dbtest –mysql-user=msandbox –mysql-password=msandbox –mysql-socket=/tmp/mysql_sandbox5537.sock prepare sysbench 0.4.12: multi-threaded system evaluation benchmark FATAL: no database driver specified FATAL: failed to initialize database driver! [root@percona-pxc55-1 nilnandan]# After some research, found that with Sysbench 0.4.x,…

How InnoDB works with transactions and auto recovery

How InnoDB work with transactions: When any transaction will be completed with COMMIT,  InnoDB will write those changes in InnoDB Buffer Pool. After that InnoDB will run some background operations like checkpoint.  Checkpoint is the most important operation which will writes the changes on disk.   Lets see how it will work. During the checkpoint phase,…

Perl script for checking MySQL database disk space usage (in GB)

Perl script for checking MySQL database disk space usage (in GB) #!/usr/bin/perl # database size verification use DBI; use Getopt::Long; #Commandline arguments #my @cmdline = @ARGV; #my $counts =@cmdline; sub usage { print STDERR @_, “n” if @_; die <<EOF; Usage: [ options ] Options: -?,  –help             show this help -h,  –host=…         connect to host…

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…