[root@fedora ~]# mysql -u root -p ← MySQLへrootでログイン
Enter password: ← MySQLのrootパスワード応答
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database test; ← testデータベース作成
Query OK, 1 row affected (0.00 sec)
mysql> use test ← testデータベースへ接続
Database changed
mysql> create table test(num int, name varchar(50)); ← testテーブル作成
Query OK, 0 rows affected (0.00 sec)
mysql> insert into test values(1,'山田太郎'); ← データ登録
Query OK, 1 row affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
mysql> select * from test; ← データ確認
+------+----------+
| num | name |
+------+----------+
| 1 | 山田太郎 |
+------+----------+
1 row in set (0.00 sec)
mysql> exit ← ログアウト
Bye
|
|