转到mysql目录
mysql -uroot -p //然后输入密码
mysql-> ip -u用户 -p密码; //连接远程主机
create database; 库名;
show databases; 显示所有的数据库。
drop database 库名;
create table item( id int(10), name vachar(20) NOT NULL, sex varchar(20) NOT NILL );
mysql> select *FROM fillz; //显示数据
+--------+------+
| Id | nn |
+--------+------+
| 000152 | 152 |
| 000008 | 9 |
| 023120 | 563 |
+--------+------+
3 rows in set (0.00 sec)
mysql> show columns from fillz; //显示结构
+-------+--------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------------------+------+-----+---------+-------+
| Id | int(6) unsigned zerofill | YES | | NULL | |
| nn | int(6) | YES | | NULL | |
+-------+--------------------------+------+-----+---------+-------+
2 rows in set (0.00 sec)
mysql> show status;//查看状态
mysql> show processlist;//查看进程