카테고리 없음

mysql db 컨트롤연습

행복을전해요 2020. 4. 21. 16:53

mysql db 컨트롤연습

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

새로운 크로스 플랫폼 PowerShell 사용 https://aka.ms/pscore6

PS C:\Users\1> ssh junsu@192.168.0.5
junsu@192.168.0.5's password:
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-96-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon Apr 20 10:01:26 UTC 2020

  System load:  0.0               Processes:             96
  Usage of /:   30.9% of 9.78GB   Users logged in:       0
  Memory usage: 4%                IP address for enp0s3: 192.168.0.5
  Swap usage:   0%

 * Kubernetes 1.18 GA is now available! See https://microk8s.io for docs or
   install it with:

     sudo snap install microk8s --channel=1.18 --classic

 * Multipass 1.1 adds proxy support for developers behind enterprise
   firewalls. Rapid prototyping for cloud operations just got easier.

     https://multipass.run/

 * Canonical Livepatch is available for installation.
   - Reduce system reboots and improve kernel security. Activate at:
     https://ubuntu.com/livepatch

37 packages can be updated.
0 updates are security updates.


Last login: Mon Apr 13 10:37:14 2020 from 192.168.0.2
junsu@junsu:~$
junsu@junsu:~$
junsu@junsu:~$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, 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> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| asdfasd55f         |
| asdfasdf           |
| junsu              |
| kkk                |
| mydb               |
| mysql              |
| performance_schema |
| sys                |
| vsddvd12           |
+--------------------+
10 rows in set (0.00 sec)

mysql> create database
    ->
    -> exit
    -> ;
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 'exit' at line 3
mysql>
mysql>
mysql> create database junsu1
    -> ;
Query OK, 1 row affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| asdfasd55f         |
| asdfasdf           |
| junsu              |
| junsu1             |
| kkk                |
| mydb               |
| mysql              |
| performance_schema |
| sys                |
| vsddvd12           |
+--------------------+
11 rows in set (0.00 sec)

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

mysql> use junsu1
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> create table member (count varchar(255));
Query OK, 0 rows affected (0.01 sec)

mysql> show tables;
+------------------+
| Tables_in_junsu1 |
+------------------+
| member           |
+------------------+
1 row in set (0.00 sec)

mysql> insert into (userid) values ("junsu);
    "> insert into (userid) values ("junsu);
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 '(userid) values ("junsu);
insert into (userid) values ("junsu)' at line 1
mysql> insert into (userid) values ("junsu);
insert into (userid) values ("junsu);
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 '(userid) values ("junsu);
insert into (userid) values ("junsu)' at line 1
mysql> insert into (userid) values ("junsu);
insert into (userid) values ("junsu");
    ">
    "> ;
    ">
    ">
    ">
    "> ;
    "> ;
    "> ;
    "> "
    ->
    -> ;
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 '(userid) values ("junsu);
insert into (userid) values ("junsu");

;



;
;
;
"' at line 1
mysql> insert into (userid) values ("junsu);
insert into (userid) values ("junsu");

;



;
;
;
";
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 '(userid) values ("junsu);
insert into (userid) values ("junsu");

;



;
;
;
"' at line 1
mysql> insert into junsu (userid) values ("junsu");
ERROR 1146 (42S02): Table 'junsu1.junsu' doesn't exist
mysql> show tables;
+------------------+
| Tables_in_junsu1 |
+------------------+
| member           |
+------------------+
1 row in set (0.00 sec)

mysql> insert into member (userid) values ("junsu");
ERROR 1mysql> insert into member (userid) values ("junsu");
ERROR 1054 (42S22): Unknown column 'userid' in 'field list'
mysql> insert into member (count) values ("1");
Query OK, 1 row affected (0.01 sec)

mysql>
mysql> create table trade(category varchar(255), total int(8));
Query OK, 0 rows affected (0.01 sec)

mysql> insert into trade(category,total) values("food",15500);
Query OK, 1 row affected (0.00 sec)

mysql> insert into trade(category,total) values("juger",25000);
Query OK, 1 row affected (0.00 sec)

mysql> select * from trade ;
+----------+-------+
| category | total |
+----------+-------+
| food     | 15500 |
| juger    | 25000 |
+----------+-------+
2 rows in set (0.00 sec)

mysql> select * from trade where total = 15500;
+----------+-------+
| category | total |
+----------+-------+
| food     | 15500 |
+----------+-------+
1 row in set (0.00 sec)

mysql> select * from trade where total = 25000 or category = "food";
+----------+-------+
| category | total |
+----------+-------+
| food     | 15500 |
| juger    | 25000 |
+----------+-------+
2 rows in set (0.00 sec)

mysql> select * from trade where total = 25000 and category = "food";
Empty set (0.00 sec)

mysql> select * from trade where total >= 25000 ;
+----------+-------+
| category | total |
+----------+-------+
| juger    | 25000 |
+----------+-------+
1 row in set (0.00 sec)

mysql> select * from trade where total >= 25000 ;
+----------+-------+
| category | total |
+----------+-------+
| juger    | 25000 |
+----------+-------+
1 row in set (0.00 sec)

mysql> select * from trade where total <= 25000 ;
+----------+-------+
| category | total |
+----------+-------+
| food     | 15500 |
| juger    | 25000 |
+----------+-------+
2 rows in set (0.00 sec)

mysql> delete from trade where total <=15500;
Query OK, 1 row affected (0.00 sec)

mysql> show tables;
+------------------+
| Tables_in_junsu1 |
+------------------+
| member           |
| trade            |
+------------------+
2 rows in set (0.00 sec)

mysql> select * from trade  ;
+----------+-------+
| category | total |
+----------+-------+
| juger    | 25000 |
+----------+-------+
1 row in set (0.00 sec)

mysql> update trade set total=2500, total=3000;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from;
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 '' at line 1
mysql> select * from trade;
+----------+-------+
| category | total |
+----------+-------+
| juger    |  3000 |
+----------+-------+
1 row in set (0.00 sec)

mysql> select * from trade
    ->
    ->
    ->
    -> ;
+----------+-------+
| category | total |
+----------+-------+
| juger    |  3000 |
+----------+-------+
1 row in set (0.00 sec)

mysql> update trade set total=6000 where total = 3000;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from trade ;
+----------+-------+
| category | total |
+----------+-------+
| juger    |  6000 |
+----------+-------+
1 row in set (0.00 sec)

mysql> update trade set total=6010, category='abc' where total = 6000;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from trade ;
+----------+-------+
| category | total |
+----------+-------+
| abc      |  6010 |
+----------+-------+
1 row in set (0.00 sec)

mysql> drop table trade;
Query OK, 0 rows affected (0.01 sec)

mysql> select * from trade ;
ERROR 1146 (42S02): Table 'junsu1.trade' doesn't exist
mysql> show tables;
+------------------+
| Tables_in_junsu1 |
+------------------+
| member           |
+------------------+
1 row in set (0.00 sec)

mysql> Welcome to the MySQL monitor.  Commands end with ; or \g.
Welcome to the MySQL monitor.  Commands end with ; or \g.
^C
mysql> Your MySQL connection id is 2
    -> Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)
    ->
    -> Copyright (c) 2000, 2020, 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> show databases;
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 'Your MySQL connection id is 2
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

' at line 1
mysql> +--------------------+
    -> | Database           |
    -> +--------------------+
    -> | information_schema |
    -> | asdfasd55f         |
    -> | asdfasdf           |
    -> | junsu              |
    -> | kkk                |
    -> | mydb               |
    -> | mysql              |
    -> | performance_schema |
    -> | sys                |
    -> | vsddvd12           |
    -> +--------------------+
    -> 10 rows in set (0.00 sec)
    ->
    -> mysql> create database
    ->     ->
    ->     -> exit
    ->     -> ;
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 '+--------------------+
| Database           |
+--------------------+
| informati' at line 1
mysql> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near 'exit' at line 3
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 'ERROR 1064 (42000): You have
an error in your SQL syntax' at line 1
    -> mysql>
    -> mysql>
    -> mysql> create database junsu1
    ->     -> ;
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 'the manual that corresponds t
o your MySQL server version for the right syntax to' at line 1
mysql> Query OK, 1 row affected (0.00 sec)
    ->
    -> mysql> show databases;
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 'Query OK, 1 row affected (0.0
0 sec)

mysql> show databases' at line 1
mysql> +--------------------+
    -> | Database           |
    -> +--------------------+
    -> | information_schema |
    -> | asdfasd55f         |
    -> | asdfasdf           |
    -> | junsu              |
    -> | junsu1             |
    -> | kkk                |
    -> | mydb               |
    -> | mysql              |
    -> | performance_schema |
    -> | sys                |
    -> | vsddvd12           |
    -> +--------------------+
    -> 11 rows in set (0.00 sec)
    ->
    -> mysql> create database junsu2;
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 '+--------------------+
| Database           |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.00 sec)
    ->
    -> mysql> use junsu1
    -> Database changed
    -> mysql> show tables;
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 'Query OK, 1 row affected (0.0
0 sec)

mysql> use junsu1
Database changed
mysql> s' at line 1
mysql> Empty set (0.00 sec)
    ->
    -> mysql> create table member (count varchar(255));
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 'Empty set (0.00 sec)

mysql> create table member (count varchar(255))' at line 1
mysql> Query OK, 0 rows affected (0.01 sec)
    ->
    -> mysql> show tables;
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 'Query OK, 0 rows affected (0.
01 sec)

mysql> show tables' at line 1
mysql> +------------------+
    -> | Tables_in_junsu1 |
    -> +------------------+
    -> | member           |
    -> +------------------+
    -> 1 row in set (0.00 sec)
    ->
    -> mysql> insert into (userid) values ("junsu);
    ">     "> insert into (userid) values ("junsu);
    "> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 '+------------------+
| Tables_in_junsu1 |
+------------------+
| member         ' at line 1
mysql> insert into (userid) values ("junsu)' at line 1
    "> mysql> insert into (userid) values ("junsu);
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 '(userid) values ("junsu)' at
line 1
mysql> insert into (userid) values ("junsu)' at line 1
mysql> insert into (userid) values ("junsu);
    "> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 '(userid) values ("junsu);
ERROR 1064 (42000): You have an error in your SQL synt' at line 1
mysql> insert into (userid) values ("junsu)' at line 1
    "> mysql> insert into (userid) values ("junsu);
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 '(userid) values ("junsu)' at
line 1
mysql> insert into (userid) values ("junsu)' at line 1
mysql> insert into (userid) values ("junsu");
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 '(userid) values ("junsu")' at
 line 1
mysql>     ">
    ">     "> ;
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 '">
    ">' at line 1
mysql>     ">
    ">     ">
    ->     ">
    ">     "> ;
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 '">
    ">
    ">
    ">' at line 1
mysql>     "> ;
    ">     "> ;
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 '"> ;
    ">' at line 1
mysql>     "> "
    ->     ->
    ->     -> ;
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 '"> "
    ->
    ->' at line 1
mysql> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 'ERROR 1064 (42000): You have
an error in your SQL syntax' at line 1
    '> insert into (userid) values ("junsu");
    '>
    '> ;
    '>
    '>
    '>
    '> ;
    '> ;
    '> ;
    '> "' at line 1
    -> mysql> insert into (userid) values ("junsu);
    "> insert into (userid) values ("junsu");
    ">
    "> ;
    ">
    ">
    ">
    "> ;
    "> ;
    "> ;
    "> ";
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 'the manual that corresponds t
o your MySQL server version for the right syntax to' at line 1
mysql> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 'ERROR 1064 (42000): You have
an error in your SQL syntax' at line 1
    '> insert into (userid) values ("junsu");
    '>
    '> ;
    '>
    '>
    '>
    '> ;
    '> ;
    '> ;
    '> "' at line 1
    -> mysql> insert into junsu (userid) values ("junsu");
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 'the manual that corresponds t
o your MySQL server version for the right syntax to' at line 1
mysql> ERROR 1146 (42S02): Table 'junsu1.junsu' doesn't exist
    '> mysql> show tables;
    '> +------------------+
    '> | Tables_in_junsu1 |
    '> +------------------+
    '> | member           |
    '> +------------------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> insert into member (userid) values ("junsu");
    '> ERROR 1mysql> insert into member (userid) values ("junsu");
    '> ERROR 1054 (42S22): Unknown column 'userid' in 'field list'
    '> mysql> insert into member (count) values ("1");
    '> Query OK, 1 row affected (0.01 sec)
    '>
    '> mysql>
    '> mysql> create table trade(category varchar(255), total int(8));
    '> Query OK, 0 rows affected (0.01 sec)
    '>
    '> mysql> insert into trade(category,total) values("food",15500);
    '> Query OK, 1 row affected (0.00 sec)
    '>
    '> mysql> insert into trade(category,total) values("juger",25000);
    '> Query OK, 1 row affected (0.00 sec)
    '>
    '> mysql> select * from trade ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> select * from trade where total = 15500;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade where total = 25000 or category = "food";
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> select * from trade where total = 25000 and category = "food";
    '> Empty set (0.00 sec)
    '>
    '> mysql> select * from trade where total >= 25000 ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade where total >= 25000 ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade where total <= 25000 ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> delete from trade where total <=15500;
    '> Query OK, 1 row affected (0.00 sec)
    '>
    '> mysql> show tables;
    '> +------------------+
    '> | Tables_in_junsu1 |
    '> +------------------+
    '> | member           |
    '> | trade            |
    '> +------------------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> select * from trade  ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> update trade set total=2500, total=3000;
    '> Query OK, 1 row affected (0.01 sec)
    '> Rows matched: 1  Changed: 1  Warnings: 0
    '>
    '> mysql> select * from;
    '> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds
    '> to your MySQL server version for the right syntax to use near '' at line 1
    '> mysql> select * from trade;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    |  3000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade
    '>     ->
    '>     ->
    '>     ->
    '>     -> ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    |  3000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> update trade set total=6000 where total = 3000;
    '> Query OK, 1 row affected (0.01 sec)
    '> Rows matched: 1  Changed: 1  Warnings: 0
    '>
    '> mysql> select * from trade ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    |  6000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> update trade set total=6010, category='abc' where total = 6000;
    '> Query OK, 1 row affected (0.00 sec)
    '> Rows matched: 1  Changed: 1  Warnings: 0
    '>
    '> mysql> select * from trade ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | abc      |  6010 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> drop table trade;
    '> Query OK, 0 rows affected (0.01 sec)
    '>
    '> mysql> select * from trade ;
    '> ERROR 1146 (42S02): Table 'junsu1.trade' doesn't exist
    -> mysql> show tables;
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 'ERROR 1146 (42S02): Table 'ju
nsu1.junsu' doesn't exist
mysql> show tables;
+----' at line 1
mysql> +------------------+
    -> | Tables_in_junsu1 |
    -> +------------------+
    -> | member           |
    -> +------------------+
    -> 1 row in set (0.00 sec)
    ->
    -> mysql>
    ->
    ->
    ->
    ->
    -> ;
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 '+------------------+
| Tables_in_junsu1 |
+------------------+
| member         ' at line 1
mysql>
mysql> Welcome to the MySQL monitor.  Commands end with ; or \g.
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 'Welcome to the MySQL monitor.
  Commands end with' at line 1
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 'or' at line 1
    -> Your MySQL connection id is 2
    -> Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)
    ->
    -> Copyright (c) 2000, 2020, 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> show databases;
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 '.
Your MySQL connection id is 2
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)' at line 1
mysql> +--------------------+
    -> | Database           |
    -> +--------------------+
    -> | information_schema |
    -> | asdfasd55f         |
    -> | asdfasdf           |
    -> | junsu              |
    -> | kkk                |
    -> | mydb               |
    -> | mysql              |
    -> | performance_schema |
    -> | sys                |
    -> | vsddvd12           |
    -> +--------------------+
    -> 10 rows in set (0.00 sec)
    ->
    -> mysql> create database
    ->     ->
    ->     -> exit
    ->     -> ;
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 '+--------------------+
| Database           |
+--------------------+
| informati' at line 1
mysql> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near 'exit' at line 3
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 'ERROR 1064 (42000): You have
an error in your SQL syntax' at line 1
    -> mysql>
    -> mysql>
    -> mysql> create database junsu1
    ->     -> ;
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 'the manual that corresponds t
o your MySQL server version for the right syntax to' at line 1
mysql> Query OK, 1 row affected (0.00 sec)
    ->
    -> mysql> show databases;
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 'Query OK, 1 row affected (0.0
0 sec)

mysql> show databases' at line 1
mysql> +--------------------+
    -> | Database           |
    -> +--------------------+
    -> | information_schema |
    -> | asdfasd55f         |
    -> | asdfasdf           |
    -> | junsu              |
    -> | junsu1             |
    -> | kkk                |
    -> | mydb               |
    -> | mysql              |
    -> | performance_schema |
    -> | sys                |
    -> | vsddvd12           |
    -> +--------------------+
    -> 11 rows in set (0.00 sec)
    ->
    -> mysql> create database junsu2;
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 '+--------------------+
| Database           |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.00 sec)
    ->
    -> mysql> use junsu1
    -> Database changed
    -> mysql> show tables;
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 'Query OK, 1 row affected (0.0
0 sec)

mysql> use junsu1
Database changed
mysql> s' at line 1
mysql> Empty set (0.00 sec)
    ->
    -> mysql> create table member (count varchar(255));
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 'Empty set (0.00 sec)

mysql> create table member (count varchar(255))' at line 1
mysql> Query OK, 0 rows affected (0.01 sec)
    ->
    -> mysql> show tables;
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 'Query OK, 0 rows affected (0.
01 sec)

mysql> show tables' at line 1
mysql> +------------------+
    -> | Tables_in_junsu1 |
    -> +------------------+
    -> | member           |
    -> +------------------+
    -> 1 row in set (0.00 sec)
    ->
    -> mysql> insert into (userid) values ("junsu);
    ">     "> insert into (userid) values ("junsu);
    "> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 '+------------------+
| Tables_in_junsu1 |
+------------------+
| member         ' at line 1
mysql> insert into (userid) values ("junsu)' at line 1
    "> mysql> insert into (userid) values ("junsu);
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 '(userid) values ("junsu)' at
line 1
mysql> insert into (userid) values ("junsu)' at line 1
mysql> insert into (userid) values ("junsu);
    "> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 '(userid) values ("junsu);
ERROR 1064 (42000): You have an error in your SQL synt' at line 1
mysql> insert into (userid) values ("junsu)' at line 1
    "> mysql> insert into (userid) values ("junsu);
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 '(userid) values ("junsu)' at
line 1
mysql> insert into (userid) values ("junsu)' at line 1
mysql> insert into (userid) values ("junsu");
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 '(userid) values ("junsu")' at
 line 1
mysql>     ">
    ">     "> ;
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 '">
    ">' at line 1
mysql>     ">
    ">     ">
    ->     ">
    ">     "> ;
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 '">
    ">
    ">
    ">' at line 1
mysql>     "> ;
    ">     "> ;
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 '"> ;
    ">' at line 1
mysql>     "> "
    ->     ->
    ->     -> ;
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 '"> "
    ->
    ->' at line 1
mysql> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 'ERROR 1064 (42000): You have
an error in your SQL syntax' at line 1
    '> insert into (userid) values ("junsu");
    '>
    '> ;
    '>
    '>
    '>
    '> ;
    '> ;
    '> ;
    '> "' at line 1
    -> mysql> insert into (userid) values ("junsu);
    "> insert into (userid) values ("junsu");
    ">
    "> ;
    ">
    ">
    ">
    "> ;
    "> ;
    "> ;
    "> ";
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 'the manual that corresponds t
o your MySQL server version for the right syntax to' at line 1
mysql> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds to your MySQL server version for the right syntax to use near '(userid) values ("juns
u);
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 'ERROR 1064 (42000): You have
an error in your SQL syntax' at line 1
    '> insert into (userid) values ("junsu");
    '>
    '> ;
    '>
    '>
    '>
    '> ;
    '> ;
    '> ;
    '> "' at line 1
    -> mysql> insert into junsu (userid) values ("junsu");
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 'the manual that corresponds t
o your MySQL server version for the right syntax to' at line 1
mysql> ERROR 1146 (42S02): Table 'junsu1.junsu' doesn't exist
    '> mysql> show tables;
    '> +------------------+
    '> | Tables_in_junsu1 |
    '> +------------------+
    '> | member           |
    '> +------------------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> insert into member (userid) values ("junsu");
    '> ERROR 1mysql> insert into member (userid) values ("junsu");
    '> ERROR 1054 (42S22): Unknown column 'userid' in 'field list'
    '> mysql> insert into member (count) values ("1");
    '> Query OK, 1 row affected (0.01 sec)
    '>
    '> mysql>
    '> mysql> create table trade(category varchar(255), total int(8));
    '> Query OK, 0 rows affected (0.01 sec)
    '>
    '> mysql> insert into trade(category,total) values("food",15500);
    '> Query OK, 1 row affected (0.00 sec)
    '>
    '> mysql> insert into trade(category,total) values("juger",25000);
    '> Query OK, 1 row affected (0.00 sec)
    '>
    '> mysql> select * from trade ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> select * from trade where total = 15500;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade where total = 25000 or category = "food";
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> select * from trade where total = 25000 and category = "food";
    '> Empty set (0.00 sec)
    '>
    '> mysql> select * from trade where total >= 25000 ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade where total >= 25000 ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade where total <= 25000 ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | food     | 15500 |
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> delete from trade where total <=15500;
    '> Query OK, 1 row affected (0.00 sec)
    '>
    '> mysql> show tables;
    '> +------------------+
    '> | Tables_in_junsu1 |
    '> +------------------+
    '> | member           |
    '> | trade            |
    '> +------------------+
    '> 2 rows in set (0.00 sec)
    '>
    '> mysql> select * from trade  ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    | 25000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> update trade set total=2500, total=3000;
    '> Query OK, 1 row affected (0.01 sec)
    '> Rows matched: 1  Changed: 1  Warnings: 0
    '>
    '> mysql> select * from;
    '> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
sponds
    '> to your MySQL server version for the right syntax to use near '' at line 1
    '> mysql> select * from trade;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    |  3000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> select * from trade
    '>     ->
    '>     ->
    '>     ->
    '>     -> ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    |  3000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> update trade set total=6000 where total = 3000;
    '> Query OK, 1 row affected (0.01 sec)
    '> Rows matched: 1  Changed: 1  Warnings: 0
    '>
    '> mysql> select * from trade ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | juger    |  6000 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> update trade set total=6010, category='abc' where total = 6000;
    '> Query OK, 1 row affected (0.00 sec)
    '> Rows matched: 1  Changed: 1  Warnings: 0
    '>
    '> mysql> select * from trade ;
    '> +----------+-------+
    '> | category | total |
    '> +----------+-------+
    '> | abc      |  6010 |
    '> +----------+-------+
    '> 1 row in set (0.00 sec)
    '>
    '> mysql> drop table trade;
    '> Query OK, 0 rows affected (0.01 sec)
    '>
    '> mysql> select * from trade ;
    '> ERROR 1146 (42S02): Table 'junsu1.trade' doesn't exist
    -> mysql> show tables;
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 'ERROR 1146 (42S02): Table 'ju
nsu1.junsu' doesn't exist
mysql> show tables;
+----' at line 1
mysql> +------------------+
    -> | Tables_in_junsu1 |
    -> +------------------+
    -> | member           |
    -> +------------------+
    -> 1 row in set (0.00 sec)
    ->
    -> mysql>;
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 '+------------------+
| Tables_in_junsu1 |
+------------------+
| member         ' at line 1
mysql>
mysql>