「Windows10」コマンドラインからMySQLへ接続

2021年9月8日

操作方法
1.管理者権限でコマンドプロンプトを起動する

2. 下記コマンドを入力する
cd C:\Program Files\MySQL\MySQL Server 8.0\bin

3.下記コマンドを入力する

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 8.0.26 MySQL Community Server – GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| sakila |
| sys |
| world |
+——————–+
6 rows in set (0.28 sec)

 

MySQL

Posted by arkgame