Skip to main content

Posts

MySQL Database Storage Engines

Storage Engine: A storage engine is a software that is used by a database management system to create, read, and update data from a database. Most DBMS use APIs (Application Programming Interface) to enable interactions of users with the storage engines. There are two types of storage engines; Transactional and Non-transactional storage engines. Transactional Databases Transactional databases mean that the write operations on these databases are able to be rolled back if they do not complete. These operations are known as transactions. Most of the modern databases are transactional databases.  Non-Transactional Databases The impact of no Rollback/Commit is felt. In order to perform rollback operation the user will need to do it manually with codes. By default, MySQL runs with autocommit mode enabled. This means that as soon as you execute a statement that updates (modifies) a table, MySQL stores the update on disk. If you are using a transaction-safe...

MySQL Cluster Set Up

1) Management node 192.168.0.1 -Management (MGM) node MySQL-ndb-tools-5.1.11-0. glibc23.rpm MySQL-ndb-management-5.1.11-0. glibc23.rpm 192.168.0.2 - MySQL server (SQL) node  MySQL-server-5.1.11-0.glibc23. rpm MySQL-shared-5.1.11-0.glibc23. rpm MySQL-client-5.1.11-0.glibc23. rpm 192.168.0.3 - Data (NDBD) node "A"  MySQL-ndb-tools-5.1.11-0. glibc23.rpm MySQL-client-5.1.11-0.glibc23. rpm MySQL-ndb-storage-5.1.11-0. glibc23.rpm MySQL-server-5.1.11-0.glibc23. rpm ( Optional ) 192.168.0.4 - Data (NDBD) node "B"  MySQL-ndb-tools-5.1.11-0. glibc23.rpm MySQL-client-5.1.11-0.glibc23. rpm MySQL-ndb-storage-5.1.11-0. glibc23.rpm MySQL-server-5.1.11-0.glibc23. rpm( Optional ) Step by Step configuration: Each data node or SQL node requires a my.cnf file that provides two pieces of information: - A connect string to find the MGM node - A line which says the MySQL server on this host to run in NDB mode. The  my.cnf  file for data node (ndb) For each data node and S...

Monitoring MySQL performance

If monitoring MySQL performance by analyzing its status values Performance Monitoring of MySQL Server: Following are the command which we can use for session or server level performance for MySQL server. SHOW GLOBAL STATUS – shows global server status SHOW LOCAL STATUS  - This is used for session level server status Have to check following values to know how server works. Aborted_clients:   Usually no need to worry for this because many programs/application don’t close connection properly. Aborted_connects:  This means authentication failure, network timeout or any other error. If the value is high than its possible that someone tries to break the password or something. Com_XXX:  This can be used to check server load that which statements are running most on server. §   Temporary Objects Created_tmp_tables:  Temporary tables can often be avoided by query optimization. Created_tmp_disk_tables:  Not enough memory is allo...

MySQL Source Installation on linux

  1. Ensure that you’re logged in as root: [user@host]#   su - root 2. Switch to the directory containing the source tarball, and extract the files within it. (Note that you will need approximately 80 MB of free space for the source tree.) [root@host]#   cd /tmp [root@host]#   tar -xzvf mysql-4.0.9-gamma.tar.gz Remember to replace the file name in italics with the file name of your source tarball. 3. Move into the directory containing the source code, [root@host]#   cd mysql-4.0.9-gamma and take a look at the contents with   ls : [root@host]#   ls -l Take a look at the sidebar entitled “Up a Tree” for more information on what each directory contains. 4. Now, set variables for the compile process via the included configure script. (Note the use of the   --prefix   argument to configure, which sets the default installation path for the compiled binaries.) [ root@host]#   ./configure --prefix=/usr/local/mysql ...