はじめとMySQLの使用

MySQLの紹介

全てのデータ記憶、検索、処理及び管理は、実際にデータベースソフトウェア--DBMS(データベース管理システム)によって実行される
MySQLのDBMSである、すなわち、それはソフトウェアのデータベースであります

MySQLのツール

DBMSサーバ- MySQLはクライアントです。
そのため、MySQLを使用するためには、mysqlコマンドに提供されているクライアントの必要性は、一つのアプリケーションで実行されます

mysqlのコマンドラインアプリケーションは、簡単なテストのために最も広く使われているプログラムのいずれかを使用して、非常に貴重なスクリプトを実行されます

[root@VM_0_7_centos mysql]# mysql -uroot -p'6HbfLn,_cC8a'
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.7.27

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

使用mysqlの

新規データベース

mysql> create database sumyum;
Query OK, 1 row affected (0.00 sec)

mysql> 

データベースのリストを見ます

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sumyum             |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

mysql> 

データベースへのアクセスを選択

mysql> use sumyum;
Database changed

使用可能なテーブルの現在のデータベースを見ます

mysql> show tables;
Empty set (0.00 sec)

データベースを削除します。

mysql> drop database sumyum;
Query OK, 0 rows affected (0.00 sec)

mysql> 

おすすめ

転載: www.cnblogs.com/inmeditation/p/11563995.html