MySQL DDL Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 25: Line 25:
==Create Database==
==Create Database==
<syntaxhighlight lang='sql'>
<syntaxhighlight lang='sql'>
CREATE DATABASE some_database;
</syntaxhighlight>
</syntaxhighlight>
==Delete Database==
==Delete Database==
<syntaxhighlight lang='sql'>
<syntaxhighlight lang='sql'>
</syntaxhighlight>
</syntaxhighlight>

Revision as of 03:56, 30 March 2021

Internal

Server Version

SELECT VERSION();

Users

Display Users

SELECT USER FROM mysql.user;

Create User

CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'somepassword';

Delete User

Database

Display Databases

SHOW DATABASES;

Create Database

CREATE DATABASE some_database;

Delete Database