MySQL DDL Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=Internal=
=Internal=
* [[MySQL Operations#Subjects|MySQL Operations]]
* [[MySQL Operations#Subjects|MySQL Operations]]
=Server Version=
<syntaxhighlight lang='sql'>
SELECT VERSION();
</syntaxhighlight>
=Users=
=Users=
==Display Users==
==Display Users==
Line 9: Line 13:
<syntaxhighlight lang='sql'>
<syntaxhighlight lang='sql'>
CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'somepassword';
CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'somepassword';
</syntaxhighlight>
==Delete User==
<syntaxhighlight lang='sql'>
</syntaxhighlight>
=Database=
==Display Databases==
<syntaxhighlight lang='sql'>
</syntaxhighlight>
==Create Database==
<syntaxhighlight lang='sql'>
</syntaxhighlight>
==Delete Database==
<syntaxhighlight lang='sql'>
</syntaxhighlight>
</syntaxhighlight>

Revision as of 03:54, 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

Create Database

Delete Database