Create a MySQL User on Linux via Command Line

Reading Time: 2 minutes

Previous Series:
MySQL via Command Line 101: Basic Database Interaction

In this article, we will be discussing how to use MySQL to create a new user on Linux via the command line. We will be working on a Liquid Web core-managed server running CentOS version 6.5 as the root user. The commands used should also work on later versions of MySQL on CentOS as well.

MySQL is a relational database management application primarily used on Linux and is a component of the LAMP stack (Linux, Apache, MySQL, and PHP).

Preflight Check

  • Log in as the root user.
  • Have access to a terminal.
  • Basic knowledge of the command line.
Continue reading “Create a MySQL User on Linux via Command Line”

Grant Permissions to a MySQL User on Linux via Command Line

Reading Time: 2 minutes

Preflight Check

  • These instructions are intended for granting a MySQL user permissions on Linux via the command line
  • I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.
Continue reading “Grant Permissions to a MySQL User on Linux via Command Line”

Select a MySQL Database on Linux via Command Line

Reading Time: 2 minutes

Pre-Flight Check

  • These instructions are intended for selecting a MySQL database on Linux via the command line.
  • I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.

Continue reading “Select a MySQL Database on Linux via Command Line”

MySQL Performance: MySQL/MariaDB Indexes

Reading Time: 6 minutes

Data in a MySQL/MariaDB database is stored in tables. A simple way of thinking about indexes is to imagine an extensive spreadsheet. This type of system is not always conducive to quick searching; that’s where an index becomes essential. If there is no index, then the database engine has to start at row one and browse through all the rows looking for the corresponding values. If this is a small table, then it is no big deal, but in larger tables and applications where there can be tables with millions and even billions of rows, it becomes problematic. As you can imagine, searching through those rows one by one will be time-consuming, even on the latest hardware. The solution is to create an INDEX (or more than one) for your data.

Continue reading “MySQL Performance: MySQL/MariaDB Indexes”

View the Selected MySQL Database on Linux via Command Line

Reading Time: < 1 minute

Pre-Flight Check

  • These instructions are intended for viewing the selected MySQL database via the command line.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.

Continue reading “View the Selected MySQL Database on Linux via Command Line”

Remove a MySQL User on Linux via Command Line

Reading Time: < 1 minute 

 

Preflight Check
  • These instructions are intended for removing a MySQL user on Linux via the command line
  • I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.

Continue reading “Remove a MySQL User on Linux via Command Line”

Remove Permissions for a MySQL User on Linux via Command Line

Reading Time: 2 minutes 

 


 

Preflight Check
  • These instructions are intended for revoking a MySQL user permissions on Linux via the command line
  • I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.

Continue reading “Remove Permissions for a MySQL User on Linux via Command Line”