Senin, 06 Agustus 2012

0 MYSQL PADA CMD

                34 File(s)    129.743.561 bytes
                2 Dir(s)  53.382.750.208 bytes free

C:\xampp\mysql\bin>dir\w
 Volume in drive C has no label.
 Volume Serial Number is 3837-CD8F

 Directory of C:\

File Not Found

C:\xampp\mysql\bin>dir \w
 Volume in drive C has no label.
 Volume Serial Number is 3837-CD8F

 Directory of C:\

File Not Found

C:\xampp\mysql\bin>dir/2
Invalid switch - "2".

C:\xampp\mysql\bin>dir/w
 Volume in drive C has no label.
 Volume Serial Number is 3837-CD8F

 Directory of C:\xampp\mysql\bin

[.]                              [..]
echo.exe                                                                my.ini
myisamchk.exe                                                      myisamlog.exe
myisampack.exe                                                    myisam_ftdump.exe
mysql.exe                                                              mysqladmin.exe
mysqlbinlog.exe                                                     mysqlcheck.exe
mysqld-debug.exe                                                 mysqld.exe
mysqldump.exe                                                     mysqldumpslow.pl
mysqld_multi.pl                                                     mysqlhotcopy.pl
mysqlimport.exe                                                    mysqlshow.exe
mysqlslap.exe                                                        mysqltest.exe
mysqltest_embedded.exe                                       mysql_client_test.exe
mysql_client_test_embedded.exe                           mysql_config.pl
mysql_convert_table_format.pl                              mysql_embedded.exe
mysql_plugin.exe                                                   mysql_secure_installation.pl
mysql_tzinfo_to_sql.exe                                        mysql_upgrade.exe
my_print_defaults.exe                                           perror.exe
replace.exe                                                          resolveip.exe
              34 File(s)    129.743.561 bytes
               2 Dir(s)  53.385.478.144 bytes free

C:\xampp\mysql\bin>mysql -h localhost -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.25a MySQL Community Server (GPL)

Copyright (c) 2000, 2011, 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> show database;
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 'datab
ase' at line 1
mysql> show database
    -> \c
mysql> show databases
    -> \c
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cdcol              |
| mysql              |
| performance_schema |
| phpmyadmin         |
| test               |
| webauth            |
+--------------------+
7 rows in set (0.00 sec)

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

mysql> use datamotor;
Database changed
mysql> create table motor (id_motor int(10) auto_increment PK, nama_siswa varcha
r(100) not null, merk_motor varchar(50) not null, plat_motor varchar(8) not null
)
    -> create table motor (id_motor int(10) auto_increment PK, nama_siswa varcha
r(100) not null, merk_motor varchar(50) not null, plat_motor varchar(8) not null
)
    -> \c
mysql> create table motor (id_motor int(10) auto_increment primary key, nama_sis
wa varchar(100) not null, merk_motor varchar(50) not null, plat_motor varchar(8)
 not null)
    -> \c
mysql> create table motor (id_motor int() auto_increment primary key, nama_siswa
 varchar(100) not null, merk_motor varchar(50) not null, plat_motor varchar(8) n
ot null)
    -> \c
mysql> create table motor (id_motor int(10) auto_increment primary key,nama_sisw
a varchar(100) not null,merk_motor varchar(50) not null,plat_motor varchar(8) no
t null)
    -> \c
mysql> create table motor (id_motor int(10) auto_increment primary key,nama_sisw
a varchar(100) not null,merk_motor varchar(50) not null,plat_motor varchar(8) no
t null);
Query OK, 0 rows affected (0.05 sec)

mysql> create table motor (id_motor int(10) auto_increment primary key,nama_sisw
a varchar(100) not null,merk_motor varchar(50) not null,plat_motor varchar(8) no
t null);
ERROR 1050 (42S01): Table 'motor' already exists
mysql> delete table motor
    -> \c
mysql> delete table motor;
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 'table
 motor' at line 1
mysql> drop table motor;
Query OK, 0 rows affected (0.01 sec)

mysql> create table motor (id_motor int(10) auto_increment primary key,nama_sisw
a varchar(100) not null,merk_motor varchar(50) not null,plat_motor varchar(8) no
t null);
Query OK, 0 rows affected (0.03 sec)

mysql> insert into motor ('123457890','jordan','ninja','B1423HB');
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 ''1234
57890','jordan','ninja','B1423HB')' at line 1
mysql> insert into motor ('123457890','jordan','ninja','B142B');
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 ''1234
57890','jordan','ninja','B142B')' at line 1
mysql> insert into motor values ('1234567890','jordan','ninja','B142B');
Query OK, 1 row affected (0.02 sec)

mysql> select * from motor
    -> ;
+------------+------------+------------+------------+
| id_motor   | nama_siswa | merk_motor | plat_motor |
+------------+------------+------------+------------+
| 1234567890 | jordan     | ninja      | B142B      |
+------------+------------+------------+------------+
1 row in set (0.00 sec)

mysql> desc motor;
+------------+--------------+------+-----+---------+----------------+
| Field      | Type         | Null | Key | Default | Extra          |
+------------+--------------+------+-----+---------+----------------+
| id_motor   | int(10)      | NO   | PRI | NULL    | auto_increment |
| nama_siswa | varchar(100) | NO   |     | NULL    |                |
| merk_motor | varchar(50)  | NO   |     | NULL    |                |
| plat_motor | varchar(8)   | NO   |     | NULL    |                |
+------------+--------------+------+-----+---------+----------------+
4 rows in set (0.03 sec)

mysql> insert into motor values ('1234567891,'ridan,'beat','B2354JHK');
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 'ridan
,'beat','B2354JHK')' at line 1
mysql> insert into motor values ('1234567891','ridan,'beat','B2354JHK');
    '> ;
    '> \c
    '> \c
    '> insert into motor values ('1234567891','ridan,'beat','B2354JHK');
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 'beat'
,'B2354JHK');
;
\c
\c
insert into motor values ('1234567891','ridan,'beat',' at line 1
mysql> insert into motor values ('1234567891','ridan,'beat','B2354HK');
    '> \c
    '> insert into motor values ('1234567891','ridan,'beat','B2354HK');
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 'beat'
,'B2354HK');
\c
insert into motor values ('1234567891','ridan,'beat','B2354' at line 1
mysql> insert into motor values ('1234567891','ridan','beat','B2354HK');
Query OK, 1 row affected (0.02 sec)

mysql> insert into motor values ('1234567892','velan','cs-1','B9487KJH');
Query OK, 1 row affected (0.01 sec)

mysql> insert into motor values ('1234567893','boy','scorpio-z','B585ADR');
Query OK, 1 row affected (0.02 sec)

mysql> insert into motor values ('1234567894','chyntia','vario','B6182JGH');
Query OK, 1 row affected (0.01 sec)

mysql> insert into motor values ('1234567895','yosephine','blade','B7723AAA');
Query OK, 1 row affected (0.02 sec)

mysql> select * from motor
    -> ;
+------------+------------+------------+------------+
| id_motor   | nama_siswa | merk_motor | plat_motor |
+------------+------------+------------+------------+
| 1234567890 | jordan     | ninja      | B142B      |
| 1234567891 | ridan      | beat       | B2354HK    |
| 1234567892 | velan      | cs-1       | B9487KJH   |
| 1234567893 | boy        | scorpio-z  | B585ADR    |
| 1234567894 | chyntia    | vario      | B6182JGH   |
| 1234567895 | yosephine  | blade      | B7723AAA   |
+------------+------------+------------+------------+
6 rows in set (0.00 sec)

mysql>

0 komentar:

Posting Komentar

 

My Lesson Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates