Mysql Commands: Difference between revisions

From The Opensource Knowledgebase
Jump to navigation Jump to search
Line 1: Line 1:
=Installation=
=Installation=
*Installation on ubuntu server through terminal
*Installation on ubuntu server through terminal
<syntaxhighlight lang="bash">
<code> sudo apt install mariadb-server </code>
sudo apt install mariadb-server
<code> sudo mysql_secure_installation </code>
sudo mysql_secure_installation
<code> sudo systemctl status mariadb </code>
sudo systemctl status mariadb
</syntaxhighlight>
*Start or stop mariadb server services
*Start or stop mariadb server services
<syntaxhighlight lang="bash">
<code> sudo systemctl stop mariadb </code>
sudo systemctl stop mariadb
<code> sudo systemctl start mariadb </code>
sudo systemctl start mariadb
 
</syntaxhighlight>
=Database Management=
=Database Management=
*Create database: param  
*Create database: param  

Revision as of 12:42, 10 January 2020

Installation

  • Installation on ubuntu server through terminal

sudo apt install mariadb-server sudo mysql_secure_installation sudo systemctl status mariadb

  • Start or stop mariadb server services

sudo systemctl stop mariadb sudo systemctl start mariadb

Database Management

  • Create database: param
    • Using defaults
mysql> CREATE DATABASE param;
  • Using specific parameters one can change the parameters based on requirement
mysql> CREATE DATABASE param DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  • Delete database: param
mysql> DROP DATABASE param;

User Management

Access Rights Management

Table Management

Backup Management