Mysql Commands: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 1: | Line 1: | ||
=Installation= | =Installation= | ||
*Installation on ubuntu server through terminal | *Installation on ubuntu server through terminal | ||
<code> sudo apt install mariadb-server </code> | : <code> sudo apt install mariadb-server </code> | ||
<code> sudo mysql_secure_installation </code> | : <code> sudo mysql_secure_installation </code> | ||
<code> sudo systemctl status mariadb </code> | : <code> sudo systemctl status mariadb </code> | ||
*Start or stop mariadb server services | *Start or stop mariadb server services | ||
<code> sudo systemctl stop mariadb </code> | <code> sudo systemctl stop mariadb </code> |
Revision as of 12:43, 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;