MySQL

From DenshiWiki
Jump to navigation Jump to search

MySQL is a dated but well-supported free/libre database software used by every website ever made, ever.

Basic operation[edit]

Creating a user[edit]

CREATE USER 'USERNAME'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';

Create a database[edit]

CREATE DATABASE YOUR_DATABASE;

Grant permissions[edit]

use YOUR_DATABASE;
GRANT ALL ON YOUR_DATABASE.* TO 'USERNAME'@'localhost';

List existing databases[edit]

SHOW DATABASES;

Delete a database[edit]

DROP DATABASE YOUR_DATABASE;