Microsoft Windows [Version 10.0.
10586]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\lenovo>cd/
C:\>cd xampp/mysql/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.21-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;
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
'database' at line 1
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| data_mhs |
| db_akademik |
| db_penjualan |
| db_rs |
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
9 rows in set (0.07 sec)
MariaDB [(none)]> create database data_mhs;
ERROR 1007 (HY000): Can't create database 'data_mhs'; database exists
MariaDB [(none)]> use data_mhs;
Database changed
MariaDB [data_mhs]> create table mahasiswa
-> (nim varchar (10) not null primary key,
-> nama varchar(20),
-> Kelas varchar(5),
-> Jalan varchar(20),
-> Kota varchar(10),
-> Provinsi varchar(10)
-> );
Query OK, 0 rows affected (0.40 sec)
MariaDB [data_mhs]> insert into mahasiswa
-> values
('171410089','Muhammad','SI3F','Jl.BasukiRahmat','Palembang','Sumsel');
Query OK, 1 row affected (0.05 sec)
MariaDB [data_mhs]> insert *from mahasiswa;
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 '*from
mahasiswa' at line 1
MariaDB [data_mhs]> select *from mahasiswa;
+-----------+----------+-------+-----------------+-----------+----------+
| nim | nama | Kelas | Jalan | Kota | Provinsi |
+-----------+----------+-------+-----------------+-----------+----------+
| 171410089 | Muhammad | SI3F | Jl.BasukiRahmat | Palembang | Sumsel |
+-----------+----------+-------+-----------------+-----------+----------+
1 row in set (0.00 sec)