Mysql

使用phpMyAdmin或者mysql命令行:

mysql -u root -p

输入密码。

mysql>CREATE DATABASE 数据库名称;

mysql>USE 数据库名称;

创建表:

mysql>CREATE TABLE users (user_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, first_name VARCHAR(20) NOT NULL, last_name VARCHAR(40) NOT NULL, email VARCHAR(60) NOT NULL, pass CHAR(40) NOT NULL, registration_date DATETIME NOT NULL, PRIMARY KEY (user_id));

mysql>SHOW TABLES;

mysql>SHOW COLUMNS FROM users;

mysql>select * from users;

退出mysql命令行:

mysql>exit

mysql