質問するログイン新規登録

質問編集履歴

1

誤字

2019/02/28 04:10

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,32 @@
1
1
  localhostから接続可能なユーザーscraperを作成して、そのパスワードをpasswordとしようとしたのですがエラーがでました。対象方法を教えて下さい。
2
2
 
3
3
  ```ここに言語を入力
4
+
5
+ (base) kobayashishunnoMacBook-Pro:~ kobayashitakashi$ mysql -u root -p
6
+ Enter password:
7
+ Welcome to the MySQL monitor. Commands end with ; or \g.
8
+ Your MySQL connection id is 14
9
+ Server version: 8.0.15 Homebrew
10
+
11
+ Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
12
+
13
+ Oracle is a registered trademark of Oracle Corporation and/or its
14
+ affiliates. Other names may be trademarks of their respective
15
+ owners.
16
+
17
+ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
18
+
19
+ mysql> CREATE DATABASE scraping DEFAULT CHARACTER SET utf8mb4;
20
+ Query OK, 1 row affected (0.00 sec)
21
+
22
+ mysql> SELECT USER, HOST, PASSWORD FROM MYSQL.USER;
23
+ ERROR 1054 (42S22): Unknown column 'PASSWORD' in 'field list'
4
- mysql>CREATE USER scraper@localhost IDENTIFIED BY 'password';
24
+ mysql> CREATE USER 'scraper'@'localhost' IDENTIFIED BY 'password';
5
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':
6
- CREATE USER scraper@localhost IDENTIFIED BY 'password'' at line 1``
25
+ ERROR 1396 (HY000): Operation CREATE USER failed for 'scraper'@'localhost'
26
+
27
+
28
+
29
+
30
+ ```
31
+
32
+ scraperが存在しなっかたので上記のコードを試したところエラーが発生しました。