MySQL conditional expression CASE

MySQL conditional expression CASE MySQL CASE expression is a conditional expression that allows you to construct conditions inside a query such as SELECT or WHERE clause.   CASE WHEN condition_1 THEN result_1 WHEN condition_2 THEN result_2 … ELSE result END The CASE expression returns the result such as result_1, result_2, etc., if the condition is true. If all conditions are false, then the result in the ELSE part … Read more

MySQL 5.7 features

mysql 5.7

MySQL 5.7 features MySQL 5.7 is the best release ever of the world’s most popular open source database and provides a new, advanced feature set designed to enable those who are building the next generation of web-based and embedded applications and services.  — Ref. https://www.mysql.com/why-mysql/white-papers/whats-new-mysql-5-7/ Multi-source Replication 3x Faster Performance New Optimizer Native JSON Support GIS … Read more

MySQL service uptime

MySQL service uptime   Sometimes, we need to check the uptime for MySQL in our server. There are multiple method to check the uptime status of mysql server. Let see some of them. mysqladmin status [root@localhost ~]# mysqladmin -u root -p********* status Uptime: 225921 Threads: 10 Questions: 18469911 Slow queries: 0 Opens: 12466 Flush tables: 1 … Read more

Replication with Different Master and Slave Storage Engines

mysql master - slave replication

Replication with Different Master and Slave Storage Engines It does not matter for the replication process whether the source table on the master and the replicated table on the slave use different engine types. In fact, the default_storage_engine and storage_engine system variables are not replicated. Even this provides a number of benefits in the replication … Read more

MySQL : Dumping Data in SQL Format with mysqldump

MySQL : Dumping Data in SQL Format with mysqldump   By default, mysqldump writes information as SQL statements to the standard output. You can save the output in a file: shell> mysqldump [arguments] > file_name To dump all databases, invoke mysqldump with the –all-databases option: shell> mysqldump –all-databases > dump.sql To dump only specific databases, name them on the command line … Read more

mysqld — The MySQL Server

mysqld, also known as MySQL Server, is the main program that does most of the work in a MySQL installation. mysqld, is MySQL server daemon program which runs quietly in background on MySQL Database Server. MySQL Server manages access to the MySQL data directory that contains databases and tables. The data directory is also the … Read more

Rename table in MYSQL

  To rename a table in MySQL you just need to run a command named RENAME TABLE, the syntax is very easy to use. RENAME TABLE table1 TO table2; The RENAME TABLE command will rename the table atomically, which means your table will be locked during the command. You can also rename more than one … Read more

Install LAMP Server (Apache, MySQL, PHP) On RHEL, CentOS

LAMP is a combination of operating system and open-source software stack. The acronym LAMP is derived from first letters of Linux, Apache HTTP Server, MySQL database, and PHP/Perl/Python. Installation of Apache Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains. To install … Read more