youkanの日記: WO5.1 MySQLその1
備忘録です。
Mac OS X Server 10.1.2
デフォルト状態
●スタートの方法
% cd /usr/local/mysql
% sudo ./bin/safe_mysqld
●初期状態
% mysqlshow
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
●テストのためのテーブルを作る
まだユーザーとかアクセス権については良く分かっていない。
% mysql test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24 to server version: 3.23.32
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create table list(
-> id int(10) NOT NULL auto_increment,
-> name char(20) DEFAULT '' NOT NULL,
-> memo char(240) DEFAULT '',
-> PRIMARY KEY (id),
-> KEY k_name (name)
-> );
Query OK, 0 rows affected (0.02 sec)
% mysqlshow test
Database: test
+--------+
| Tables |
+--------+
| list |
+--------+
WO5.1 MySQLその1 More ログイン