. WIKIMERIONET
Merion Mertics , ,

-
-
CRM

MySQL Linux

All your base are belong to us

3

MySQL - . , MySQL MariaDB Linux.

DevOps

MySQL MariaDB.

( , - CREATE) root.

MySQL, :

mysql -u root -p

root MySQL. MySQL, -p.


MySQL

MySQL , .

MySQL MariaDB, , database_name - , :

CREATE DATABASE database_name;

:

Query OK, 1 row affected (0.00 sec)

, , :

ERROR 1007 (HY000): Can't create database 'database_name'; database exists

, , , , IF NOT EXISTS:

CREATE DATABASE IF NOT EXISTS database_name;

:

Query OK, 1 row affected, 1 warning (0.00 sec)

Query OK , , 1 , , . Linux MySQL .


MySQL

MySQL, :

SHOW DATABASES;

. :

+--------------------+
| Database           |
+--------------------+
| information_schema |
| database_name      |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)

MySQL

, .

MySQL, :

USE database_name;

:

Database changed

, , .

, , USE.

MySQL, :

mysql -u root -p database_name

MySQL mysqladmin

mysqladmin MySQL Linux.

, database_name, :

mysqladmin -u root -p create database_name

?


: