C:\mysql\bin>mysql -u root -p
Enter password: ***************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.0.67-community MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database mkmode; < - - - 例として mkmode を作成
Query OK, 1 row affected (0.01 sec)
mysql> grant all privileges on mkmode.* to ユーザ名@localhost identified by 'パスワード'; < - - - ユーザを作成
Query OK, 0 rows affected (0.03 sec)
mysql> exit
Bye
C:\mysql\bin>mysql -u root -p mkmode < dacnt3.sql
Enter password: ***************
テーブルが作成されたか確認してみる。
1234567891011121314151617
C:\mysql\bin>mysql -u root -p mkmode
Enter password: ***************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.0.67-community MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show tables;
+------------------+
| Tables_in_mkmode |
+------------------+
| dacounter3 |
+------------------+
1 row in set (0.01 sec)
mysql>