Vous êtes sur la page 1sur 5

Microsoft Windows [Version 10.0.

14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\wiran>cd..
C:\Users>cd..
C:\>xampp
'xampp' is not recognized as an internal or external command,
operable program or batch file.
C:\>xd xampp
'xd' is not recognized as an internal or external command,
operable program or batch file.
C:\>cd xampp
C:\xampp>cd mysql
C:\xampp\mysql>cd bin
C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.16-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show database
-> Ctrl-C -- exit!
Bye
C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.16-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
5 rows in set (0.03 sec)
MariaDB [(none)]> create database namadb;
Query OK, 1 row affected (0.02 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| namadb |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
6 rows in set (0.00 sec)
MariaDB [(none)]> use namadb;
Database changed
MariaDB [namadb]> show tables;
Empty set (0.00 sec)
MariaDB [namadb]> creat table namatbl(nim int(10), nama varchar(15),alamat varch
ar(20), semester varchar(2));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'cre
at table namatbl(nim int(10), nama varchar(15),alamat varchar(20), semester v' a
t line 1
MariaDB [namadb]> create table namatbl(nim int(10), nama varchar(15),alamat varc
har(20), semester varchar(2));
Query OK, 0 rows affected (1.28 sec)
MariaDB [namadb]> desc namatbl;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| nim | int(10) | YES | | NULL | |
| nama | varchar(15) | YES | | NULL | |
| alamat | varchar(20) | YES | | NULL | |
| semester | varchar(2) | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
4 rows in set (0.03 sec)
MariaDB [namadb]> alter namatbl add telepon varchar(10);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'nam
atbl add telepon varchar(10)' at line 1
MariaDB [namadb]> alter table namatbl add telepon varchar(10);
Query OK, 0 rows affected (2.05 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [namadb]> desc namatbl;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| nim | int(10) | YES | | NULL | |
| nama | varchar(15) | YES | | NULL | |
| alamat | varchar(20) | YES | | NULL | |
| semester | varchar(2) | YES | | NULL | |
| telepon | varchar(10) | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
5 rows in set (0.02 sec)
MariaDB [namadb]> alter table namatbl drop telepon varchar(10);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'var
char(10)' at line 1
MariaDB [namadb]> alter table namatbl drop telepon;
Query OK, 0 rows affected (2.15 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [namadb]> desc namatbl;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| nim | int(10) | YES | | NULL | |
| nama | varchar(15) | YES | | NULL | |
| alamat | varchar(20) | YES | | NULL | |
| semester | varchar(2) | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
MariaDB [namadb]> show table;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near '' a
t line 1
MariaDB [namadb]> show tables;
+------------------+
| Tables_in_namadb |
+------------------+
| namatbl |
+------------------+
1 row in set (0.00 sec)
MariaDB [namadb]> create table namatbl1(kolom int,kolom2 int);
Query OK, 0 rows affected (1.31 sec)
MariaDB [namadb]> show tables;
+------------------+
| Tables_in_namadb |
+------------------+
| namatbl |
| namatbl1 |
+------------------+
2 rows in set (0.00 sec)
MariaDB [namadb]> drop table mamatbl1
-> show tables;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'sho
w tables' at line 2
MariaDB [namadb]> drop namatbl1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'nam
atbl1' at line 1
MariaDB [namadb]> show tables;
+------------------+
| Tables_in_namadb |
+------------------+
| namatbl |
| namatbl1 |
+------------------+
2 rows in set (0.00 sec)
MariaDB [namadb]> drop namatbl1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'nam
atbl1' at line 1
MariaDB [namadb]> drop table namatbl1;
Query OK, 0 rows affected (0.32 sec)
MariaDB [namadb]> show tables;
+------------------+
| Tables_in_namadb |
+------------------+
| namatbl |
+------------------+
1 row in set (0.00 sec)
MariaDB [namadb]> desc namatbl
->
-> ;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| nim | int(10) | YES | | NULL | |
| nama | varchar(15) | YES | | NULL | |
| alamat | varchar(20) | YES | | NULL | |
| semester | varchar(2) | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
4 rows in set (0.02 sec)
MariaDB [namadb]> insert into table valunes('160030071', 'made a','tabanan',4);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'tab
le valunes('160030071', 'made a','tabanan',4)' at line 1
MariaDB [namadb]> insert into namatbl valunes('160030071', 'made a','tabanan',4)
;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'val
unes('160030071', 'made a','tabanan',4)' at line 1
MariaDB [namadb]> insert into namatbl valunes('160030071', 'made a','tabanan',4)
;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'val
unes('160030071', 'made a','tabanan',4)' at line 1
MariaDB [namadb]> insert into namatbl valunes('160030071','made a','tabanan',4);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'val
unes('160030071','made a','tabanan',4)' at line 1
MariaDB [namadb]> insert into namatbl values('160030071','made a','tabanan',4);
Query OK, 1 row affected (0.56 sec)
MariaDB [namadb]> insert into namatbl values('160030071','made bv','bangli',2);
Query OK, 1 row affected (0.05 sec)
MariaDB [namadb]> insert into namatbl values('160030071','putu bv','bangli',2);
Query OK, 1 row affected (0.86 sec)
MariaDB [namadb]> insert into namatbl values('160030071','biawak','denpasar',3);
Query OK, 1 row affected (0.08 sec)
MariaDB [namadb]> select*;
ERROR 1096 (HY000): No tables used
MariaDB [namadb]> select*from namatbl;
+-----------+---------+----------+----------+
| nim | nama | alamat | semester |
+-----------+---------+----------+----------+
| 160030071 | made a | tabanan | 4 |
| 160030071 | made bv | bangli | 2 |
| 160030071 | putu bv | bangli | 2 |
| 160030071 | biawak | denpasar | 3 |
+-----------+---------+----------+----------+
4 rows in set (0.00 sec)
MariaDB [namadb]>

Vous aimerez peut-être aussi