Different type of threads used by MySQL

MySQL uses different type of threads for running specific utilities like mysql_install_db, flushes MyISAM tables, Replication, TCP/IP sockets etc. All threads can run with four different priorities like Interrupt, connect, wait and query priorities. Different types of threads are: The main thread : This one is created by MySQL client normally, this will be one…

Communication protocols in MySQL

Generally, MySQL supports connections between clients and the server using several networking protocols. Below are the main protocols which are used by client to connect with MySQL server. TCP/IP Unix socket file Named pipe Shared memory TCP/IP connections are supported by any MySQL server unless the server is started with the –skip-networking option. These connections…

Event scheduler in MySQL 5.1

I just recently used Event scheduler which was the major feature in MySQL 5.1 version. Its very much similar to the linux crontab functionality. MySQL Event is nothing but a bunch of statements which we can run on specific schedule. When you will create any event, its just a database object like table, view or…

Some guidelines for MySQL security

Don’t share root user password and mysql.user table acess with anyone till you have full trust on it. Because that encrypted password is real password in MySQL so if anyone knows that than he/she can easily login with any user if he has access to his host. Check with “mysql -uroot ” command, If you…

Limitations of partitioning in MySQL 5.1

Some limitations of partitioning in MySQL 5.1 on one page. All columns used in the partitioning expression for a partitioned table must be part of every unique key that the table may have.These rules also apply to existing nonpartitioned tables that you wish to partition. Partitioning applies to all data and indexes of a table;…

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…