首页 > 代码库 > Dos下mySql
Dos下mySql
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | C:\Windows\system32><span style= "color: #ff0000;" ><strong>mysql -hlocalhoset -uroot -p</strong></span> Enter password: ***** mysql> <span style= "color: #ff0000;" >use ssh</span> Database changed mysql> <span style= "color: #ff0000;" >show tables;</span> +----------------+ | Tables_in_ssh | +----------------+ | admin | | department | | privilege | | privilege_role | | role | | user_role | +----------------+ 6 rows in set ( 0.00 sec)<br><br> //显示表结构 1 )mysql> <span style= "color: #ff0000;" >desc admin;</span> +---------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+--------------+------+-----+---------+-------+ | id | varchar( 255 ) | NO | PRI | NULL | | | name | varchar( 255 ) | YES | | NULL | | | account | varchar( 255 ) | YES | | NULL | | | password | varchar( 255 ) | YES | | NULL | | | addTime | datetime | YES | | NULL | | | delSign | varchar( 255 ) | YES | | NULL | | | lockStatus | varchar( 255 ) | YES | | NULL | | | phone | varchar( 255 ) | YES | | NULL | | | email | varchar( 255 ) | YES | | NULL | | | nowLoginTime | datetime | YES | | NULL | | | nowLoginIp | varchar( 255 ) | YES | | NULL | | | lastLoginTime | datetime | YES | | NULL | | | lastLoginIp | varchar( 255 ) | YES | | NULL | | | loginCount | int ( 11 ) | YES | | NULL | | | description | varchar( 255 ) | YES | | NULL | | | gender | varchar( 255 ) | YES | | NULL | | | birthday | datetime | YES | | NULL | | | icon | varchar( 255 ) | YES | | NULL | | | qq | varchar( 255 ) | YES | | NULL | | | address | text | YES | | NULL | | | departmentId | varchar( 255 ) | YES | MUL | NULL | | +---------------+--------------+------+-----+---------+-------+ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 2 )mysql> <span style= "color: #ff0000;" >show create table admin;</span> ------------------------------------+ | admin | CREATE TABLE `admin` ( `id` varchar( 255 ) NOT NULL, `name` varchar( 255 ) DEFAULT NULL, `account` varchar( 255 ) DEFAULT NULL, `password` varchar( 255 ) DEFAULT NULL, `addTime` datetime DEFAULT NULL, `delSign` varchar( 255 ) DEFAULT NULL, `lockStatus` varchar( 255 ) DEFAULT NULL, `phone` varchar( 255 ) DEFAULT NULL, `email` varchar( 255 ) DEFAULT NULL, `nowLoginTime` datetime DEFAULT NULL, `nowLoginIp` varchar( 255 ) DEFAULT NULL, `lastLoginTime` datetime DEFAULT NULL, `lastLoginIp` varchar( 255 ) DEFAULT NULL, `loginCount` int ( 11 ) DEFAULT NULL, `description` varchar( 255 ) DEFAULT NULL, `gender` varchar( 255 ) DEFAULT NULL, `birthday` datetime DEFAULT NULL, `icon` varchar( 255 ) DEFAULT NULL, `qq` varchar( 255 ) DEFAULT NULL, `address` text, `departmentId` varchar( 255 ) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK586034F91261A86` (`departmentId`), CONSTRAINT `FK586034F91261A86` FOREIGN KEY (`departmentId`) REFERENCES `department` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | +-------+-------------------------------------------------------------------------------------- |
3)show columns from admin;
4)describe admin;
Dos下mySql
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。