How to check MariaDB server version

Question: I am on a VPS server where MariaDB server is running. How can I find out which version of MariaDB server it is running? There are circumstances where you need to know the version of your database server, e.g., when upgrading the database or patching any known server vulnerabilities. There are a few ways […]
Continue reading…

 

How to install phpMyAdmin on CentOS

Question: I am running a MySQL/MariaDB server on CentOS, and I would like to manage its databases via web-based interface using phpMyAdmin. What is a proper way to install phpMyAdmin on CentOS? phpMyAdmin is an open-source PHP application designed as a web-based MySQL/MariaDB database administration tool. While there exist lightweight database management tools such as […]
Continue reading…

 

How to create a MySQL database from the command line

Question: I have a MySQL server up and running somewhere. How can I create and populate a MySQL database from the command line? To create a MySQL database from the command line, you can use mysql CLI client. Here is a step-by-step procedure to create and populate a MySQL database using mysql client from the […]
Continue reading…

 

How to check the number of MySQL connections on Linux

Question: I want to check how busy my MySQL server is. Is there a way to check the number of active MySQL connections to a MySQL server? To count the current MySQL connections of a MySQL server, use this Linux command line trick. Assuming that you are already on the Linux host where the MySQL […]
Continue reading…

 

How to check MySQL storage engine type on Linux

Question: I need to know whether my MySQL database table is MyISAM or Innodb type. How can I check the type of a MySQL database table? There are two major MySQL storage engines used: MyISAM and Innodb. MyISAM is non-transactional, and thus can be faster for reads, while InnoDB fully supports transactions (e.g., commit/rollback) with […]
Continue reading…

 

How to back up MySQL or MariaDB databases remotely via ssh

Question: I want to back up a MySQL (MariaDB) database running on a remote server. Is there a way to back up and dump a remote MySQL (MariaDB) database over SSH? mysqldump is a command-line utility for backing up MySQL (MariaDB) databases. In order to back up a remote database, you can send mysqldump command […]
Continue reading…

 

How to remove MySQL on Ubuntu or Debian

Question: I have MySQL installed by apt-get on Ubuntu. What is a proper way to uninstall and remove MySQL on Ubuntu (or Debian, Linux Mint)? First of all, stop MySQL server if it’s running. $ sudo service mysql stop If you want to remove MySQL completely, use the following commands. This will uninstall MySQL server/client […]
Continue reading…