MySQL

HowTo : Execute a MySQL Command from a Linux BASH Shell?

Use one of the following commands to run a MySQL query from a Linux Command Line or a Bash Script.

HowTo : Create MySQL Database from the Command Line

Creating MySQL Database from the command line is quite a common task.

We'll create database named test_db with a user named john and a password pass.

User will have all privileges on this database and will be allowed to connect only from the localhost.

MySQL Server Installation and Initial Configuration on CentOS/RHEL

MySQL is the world's most popular open source relational database management system that runs as a server providing multi-user access to a number of databases.

This guide explains how to install and perform the initial secure configuration of MySQL Server on CentOS/RHEL based systems.

HowTo : Change a User's Password in MySQL

Changing a MySQL user's password is a task handled by the database administrator (root).

Once the MySQL user's password is changed, you should update the user's privileges.

HowTo : Restore MySQL Database From the Command Line

Do not use phpMyAdmin to restore your MySQL database if the MySQL database is large.

phpMyAdmin has limit on total upload size and, there is also maximum execution time which may cause browser to time out.

The solution of how to restore large MySQL database from the sql dump file is to use Linux/Unix command line.

HowTo : BackUp MySQL Database From the Command Line

The basic installation of MySQL Server provides a great command line utility to take backup of MySQL databases.

The 'mysqldump' command is used for creation "dumps" of databases managed by MySQL.

These dumps are just files with all the SQL commands needed to recreate the database.

Checking MySQL Replication Status

The most common task when managing a replication process is to ensure that the replication is taking place and that there have been no errors between the slave and the master.

The primary statement for this is 'SHOW SLAVE STATUS', which you must execute on each slave.