Creating a Test Table - Comment
<< MySQL - Installation on Windows
<< Building Chinese Web Sites using PHP
This section describes how to create a new table for testing purpose with MySQL monitor.
In order to perform database related tests on MySQL server, I created a new table called "Comment" with MySQL Monitor:
C:\>\local\mysql\bin\mysql -u herong -pTopSecret mysql> USE HerongDB; Database changed mysql> CREATE TABLE Comment (ID INTEGER PRIMARY KEY AUTO_INCREMENT, -> Name VARCHAR(256), Comment LONGTEXT); Query OK, 0 rows affected (0.02 sec) mysql> INSERT INTO Comment (Name, Comment) -> VALUES ('Herong', 'This is a test.'); Query OK, 1 row affected (0.36 sec) mysql> SELECT * FROM Comment; +----+--------+-----------------+ | ID | Name | Comment | +----+--------+-----------------+ | 1 | Herong | This is a test. | +----+--------+-----------------+ 1 row in set (0.00 sec)
Note that table "Comment" has 3 columns:
Sections in This Chapter
MySQL 5.0 Download, Installation and Start
mysqladmin - MySQL Admin Tool
mysql - Command Line Tool
Creating Database and User with MySQL Monitor