C:Program Files (x86)MySQLMySQL Server 5.0bin>mysql -u wu -p
Enter password: **
登入成功后显示如下信息:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 57
Server version: 5.0.41-community-nt MySQL Community Edition (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> select user();
+--------------+
| user() |
+--------------+
| wu@localhost |
+--------------+
1 row in set (0.00 sec)
mysql> select user,host from mysql.user;
+------+-----------+
| user | host |
+------+-----------+
| wu | |
| root | % |
| root | localhost |
+------+-----------+
3 rows in set (0.00 sec)
mysql> show creat table db;
create table MyClass1(
id int(4) not null ,
name char(20) not null,
sex int(4) not null default '0',
degree double(16,2));
insert into MyClass values(1,'Tom',96,2),(2,'Joan',82,2), (3,'Wang', 96,2);
mysql> desc myclass1;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| id | int(4) | NO | PRI | 0 | |
| name | char(20) | NO | | | |
| sex | int(4) | NO | | 0 | |
| degree | double(16,2) | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
4 rows in set