Creating a Test Table - Comment

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:

Last update: 2015.

Table of Contents

 About This Book

 PHP Installation on Windows Systems

 Integrating PHP with Apache Web Server

 charset="*" - Encodings on Chinese Web Pages

 Chinese Characters in PHP String Literals

 Multibyte String Functions in UTF-8 Encoding

 Input Text Data from Web Forms

 Input Chinese Text Data from Web Forms

MySQL - Installation on Windows

 MySQL 5.0 Download, Installation and Start

 mysqladmin - MySQL Admin Tool

 mysql - Command Line Tool

 Creating Database and User with MySQL Monitor

Creating a Test Table - Comment

 MySQL - Connecting PHP to Database

 MySQL - Character Set and Encoding

 MySQL - Sending Non-ASCII Text to MySQL

 Retrieving Chinese Text from Database to Web Pages

 Input Chinese Text Data to MySQL Database

 References

 PDF Printing Version