MySQL数据库以及表的管理
MySQL数据库以及表的管理
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
mysql> help create database
Name: 'CREATE DATABASE'
Description:
Syntax:
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
[create_specification] ... create_specification:
[DEFAULT] CHARACTER SET [=] charset_name #设置字符集
| [DEFAULT] COLLATE [=] collation_name #设置排序方式 CREATE DATABASE creates a database with the given name. To use this
statement, you need the CREATE privilege for the database. CREATE
SCHEMA is a synonym for CREATE DATABASE. URL: http://dev.mysql.com/doc/refman/5.1/en/create-database.html mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
rows in set (0.00 sec) mysql>
mysql> create database yinzhengjie;
Query OK, row affected (0.01 sec) mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
+--------------------+
rows in set (0.00 sec) mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
+--------------------+
rows in set (0.00 sec) mysql> create database if not exists yinzhengjie;
Query OK, row affected, warning (0.00 sec) mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
+--------------------+
rows in set (0.00 sec) mysql>
mysql> help drop database;
Name: 'DROP DATABASE'
Description:
Syntax:
DROP {DATABASE | SCHEMA} [IF EXISTS] db_name DROP DATABASE drops all tables in the database and deletes the
database. Be very careful with this statement! To use DROP DATABASE,
you need the DROP privilege on the database. DROP SCHEMA is a synonym
for DROP DATABASE. *Important*: When a database is dropped, user privileges on the
database are not automatically dropped. See [HELP GRANT]. IF EXISTS is used to prevent an error from occurring if the database
does not exist. URL: http://dev.mysql.com/doc/refman/5.1/en/drop-database.html mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
+--------------------+
rows in set (0.00 sec) mysql> drop database if exists yinzhengjie;
Query OK, rows affected (0.00 sec) mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
rows in set (0.00 sec) mysql>
mysql> help alter database
Name: 'ALTER DATABASE'
Description:
Syntax:
ALTER {DATABASE | SCHEMA} [db_name]
alter_specification ...
ALTER {DATABASE | SCHEMA} db_name
UPGRADE DATA DIRECTORY NAME alter_specification:
[DEFAULT] CHARACTER SET [=] charset_name #设置字符集
| [DEFAULT] COLLATE [=] collation_name #修改排序方式 ALTER DATABASE enables you to change the overall characteristics of a
database. These characteristics are stored in the db.opt file in the
database directory. To use ALTER DATABASE, you need the ALTER privilege
on the database. ALTER SCHEMA is a synonym for ALTER DATABASE.
....
mysql>
MyISAM表,每个表有三个文件,都位于数据库目录中
tb_name.frm:表结构定义
tb_name.MYD:数据文件
tb_name.MYI:索引文件
InnoDB表,有两种存储方式
第一种(默认方式):每表有一个独立文件和一个多表共享的文件
tb_name.frm:表结构的定义,位于数据库目录中
ibdata#:共享的表空间文件,默认位于数据目录(datadir指向的目录)中
第二种(独立的表空间文件,推荐使用这一种方式):
tb_name.frm:每表有一个表结构文件
tb_name.ibd:一个独立的表空间文件
应该修改innodb_file_per_table为ON,我们可以在mysql的配置文件中的[msyqld]下的字段修改它的值为NO即可完成永久生效哟。
CREATE [TEMPORARY(临时表,保存在内存中)] TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
[table_options]
(create_definition,...)
字段的定义:字段名、类型和类型修饰符
键、索引和约束
primary key,unique key,foreign key,check
{index|key}
[table_options]
engine [=] engine_name
AUTO_INCREMENT [=] value 指定AUTO_INCREMENT的起始值
[DEFAULT] CHARACTER SET [=] charset_name 指定默认字符集
CHECKSUM [=] { | } 是否使用校验值
[DEFAULT] COLLATE [=] collation_name 排序规则
COMMENT [=] 'string' 注释
DELAY_KEY_WRITE [=] { | } 是否启用键延迟写入
ROW_FORMAT [=] {DEFAULT(默认)|DYNAMIC(动态)|FIXED(静态)|COMPRESSED(压缩)|REDUNDANT(冗余)|COMPACT(紧致)} 表格式
TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}] 表空间
mysql> help create table
Name: 'CREATE TABLE'
Description:
Syntax:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
[table_options]
[partition_options]
....
mysql>
查看创建表的帮助信息
mysql> select database();
+------------+
| database() |
+------------+
| NULL |
+------------+
row in set (0.00 sec) mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
rows in set (0.00 sec) mysql> create database if not exists yinzhengjie;
Query OK, row affected (0.00 sec) mysql> use yinzhengjie
Database changed
mysql>
mysql> select database();
+-------------+
| database() |
+-------------+
| yinzhengjie |
+-------------+
row in set (0.00 sec) mysql> create table t1 (Name varchar() not null,Age tinyint unsigned not null,primary key(Name,Age)); #创建一个表,定义Name字段类型自动变化长度的字符类型(varchar),不能为空,定义一个Age字段类型为微整形(tinyint),也不能为空,定义主键(primary key)是Name和Age两个字段。
Query OK, rows affected (0.08 sec) mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
创建一个表包含主键的表
mysql> show table status like 't1'\G; #查看之前创建表的存储引擎。
*************************** . row ***************************
Name: t1
Engine: MyISAM
Version:
Row_format: Dynamic
Rows:
Avg_row_length:
Data_length:
Max_data_length:
Index_length:
Data_free:
Auto_increment: NULL
Create_time: -- ::
Update_time: -- ::
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
row in set (0.00 sec) ERROR:
No query specified mysql>
mysql> drop table t1;
Query OK, rows affected (0.00 sec) mysql> create table t1 (Name varchar() not null,Age tinyint unsigned not null,primary key(Name,Age)) engine='InnoDB';
Query OK, rows affected (0.05 sec) mysql> show table status like 't1'\G;
*************************** . row ***************************
Name: t1
Engine: InnoDB
Version:
Row_format: Compact
Rows:
Avg_row_length:
Data_length:
Max_data_length:
Index_length:
Data_free:
Auto_increment: NULL
Create_time: -- ::
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
row in set (0.00 sec) ERROR:
No query specified mysql>
创建表的存储引擎
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(create_definition,...)]
[table_options]
select_statement #将select的结果来作为字段创建新表的字段,但是可能失去属性定义的。
用法格式
mysql> select * from t1;
Empty set (0.01 sec) mysql>
mysql> insert into t1(Name,Age) values ("yinzhengjie",);
Query OK, row affected (0.00 sec) mysql>
mysql> select * from t1;
+-------------+-----+
| Name | Age |
+-------------+-----+
| yinzhengjie | |
+-------------+-----+
row in set (0.00 sec) mysql>
mysql> create table t2 select * from t1;
Query OK, row affected (0.01 sec)
Records: Duplicates: Warnings: mysql> select * from t2;
+-------------+-----+
| Name | Age |
+-------------+-----+
| yinzhengjie | |
+-------------+-----+
row in set (0.00 sec) mysql>
mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql> desc t2; #我们可以发现t2的表中的字段属性和t1的并不一致哟!只是数值一致而已。
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | | NULL | |
| Age | tinyint() unsigned | NO | | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
案例展示
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
{ LIKE old_tbl_name | (LIKE old_tbl_name) }
用法格式
mysql> select database();
+-------------+
| database() |
+-------------+
| yinzhengjie |
+-------------+
row in set (0.00 sec) mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| t1 |
| t2 |
+-----------------------+
rows in set (0.00 sec) mysql> create table t3 like t1;
Query OK, rows affected (0.04 sec) mysql> select * from t3;
Empty set (0.01 sec) mysql> desc t3;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.01 sec) mysql>
用法展示
DROP [TEMPORARY] TABLE [IF EXISTS]
tbl_name [, tbl_name] ...
[RESTRICT | CASCADE]
用法格式
mysql> select database();
+-------------+
| database() |
+-------------+
| yinzhengjie |
+-------------+
row in set (0.00 sec) mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| t1 |
| t2 |
| t3 |
+-----------------------+
rows in set (0.00 sec) mysql> drop table t2,t3;
Query OK, rows affected (0.07 sec) mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| t1 |
+-----------------------+
row in set (0.00 sec) mysql>
用法展示
ALTER TABLE tbl_name
[alter_specification [, alter_specification] ...]
修改字段定义:
插入新字段:
ADD [COLUMN] col_name column_definition
[FIRST | AFTER col_name ]
删除字段
DROP [COLUMN] col_name
修改字段
修改字段名称
CHANGE [COLUMN] old_col_name new_col_name column_definition
[FIRST|AFTER col_name]
修改字段类型及属性等
MODIFY [COLUMN] col_name column_definition
[FIRST | AFTER col_name]
表改名:
rename to|as new tb_name
修改存储引擎
engine =
指定排序标准的字段
ORDER BY col_name [, col_name] ...
用法格式集合
mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql> alter table t1 add ID tinyint unsigned not null;
Query OK, row affected (0.02 sec)
Records: Duplicates: Warnings: mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
| ID | tinyint() unsigned | NO | | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
插入新字段用法展示
mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
| ID | tinyint() unsigned | NO | | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
mysql> alter table t1 add Gender enum('boy','girl') not null default 'boy' after Age; #插入的字段我们用关键字“after”指定在“Age”之后。(注意,如果你使用first则表示插入在第一个字段哟)
Query OK, row affected (0.05 sec)
Records: Duplicates: Warnings: mysql> desc t1;
+--------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
| Gender | enum('boy','girl') | NO | | boy | |
| ID | tinyint() unsigned | NO | | NULL | |
+--------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
插入指定的位置用法展示
mysql> desc t1;
+--------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
| Gender | enum('boy','girl') | NO | | boy | |
| ID | tinyint() unsigned | NO | | NULL | |
+--------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
mysql> alter table t1 drop Gender;
Query OK, row affected (0.02 sec)
Records: Duplicates: Warnings: mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
| ID | tinyint() unsigned | NO | | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
删除字段案例展示
mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
| ID | tinyint() unsigned | NO | | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql> alter table t1 modify ID tinyint unsigned not null first;
Query OK, row affected (0.02 sec)
Records: Duplicates: Warnings: mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| ID | tinyint() unsigned | NO | | NULL | |
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
修改字段类型及属性等(改变字段的位置)
mysql> desc t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| ID | tinyint() unsigned | NO | | NULL | |
| Name | varchar() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql> alter table t1 change Name StudentName char() not null;
Query OK, row affected (0.03 sec)
Records: Duplicates: Warnings: mysql> desc t1;
+-------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| ID | tinyint() unsigned | NO | | NULL | |
| StudentName | char() | NO | PRI | NULL | |
| Age | tinyint() unsigned | NO | PRI | NULL | |
+-------------+---------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>
修改字段名称
mysql> show indexes from t1; #查看当前索引信息
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| t1 | | PRIMARY | | StudentName | A | | NULL | NULL | | BTREE | |
| t1 | | PRIMARY | | Age | A | | NULL | NULL | | BTREE | |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
rows in set (0.00 sec) mysql> alter table t1 add index(StudentName); #创建一个索引
Query OK, row affected (0.02 sec)
Records: Duplicates: Warnings: mysql> show indexes from t1;
+-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| t1 | | PRIMARY | | StudentName | A | | NULL | NULL | | BTREE | |
| t1 | | PRIMARY | | Age | A | | NULL | NULL | | BTREE | |
| t1 | | StudentName | | StudentName | A | | NULL | NULL | | BTREE | |
+-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
rows in set (0.00 sec) mysql> alter table t1 drop INDEX StudentName; #删除索引信息
Query OK, row affected (0.04 sec)
Records: Duplicates: Warnings: mysql> show indexes from t1;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| t1 | | PRIMARY | | StudentName | A | | NULL | NULL | | BTREE | |
| t1 | | PRIMARY | | Age | A | | NULL | NULL | | BTREE | |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
rows in set (0.00 sec) mysql>
创建索引和删除索引用法展示
mysql> select database();
+-------------+
| database() |
+-------------+
| yinzhengjie |
+-------------+
row in set (0.01 sec) mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| t1 |
+-----------------------+
row in set (0.00 sec) mysql> alter table t1 rename to mysql_test_table; #可以用alter命令进行修改标明
Query OK, rows affected (0.00 sec) mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| mysql_test_table |
+-----------------------+
row in set (0.00 sec) mysql>
mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| mysql_test_table |
+-----------------------+
row in set (0.00 sec) mysql> rename table mysql_test_table to t1; #当然我们也可以直接用rename命令进行修改哟~
Query OK, rows affected (0.01 sec) mysql> show tables;
+-----------------------+
| Tables_in_yinzhengjie |
+-----------------------+
| t1 |
+-----------------------+
row in set (0.00 sec) mysql>
修改表名的两种常见的姿势
mysql> show table status like 't1'\G
*************************** . row ***************************
Name: t1
Engine: InnoDB
Version:
Row_format: Compact
Rows:
Avg_row_length:
Data_length:
Max_data_length:
Index_length:
Data_free:
Auto_increment: NULL
Create_time: -- ::
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
row in set (0.00 sec) mysql> alter table t1 engine=MyISAM;
Query OK, row affected (0.02 sec)
Records: Duplicates: Warnings: mysql> show table status like 't1'\G
*************************** . row ***************************
Name: t1
Engine: MyISAM
Version:
Row_format: Fixed
Rows:
Avg_row_length:
Data_length:
Max_data_length:
Index_length:
Data_free:
Auto_increment: NULL
Create_time: -- ::
Update_time: -- ::
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
row in set (0.00 sec) mysql>
修改表选项案例展示
MySQL数据库以及表的管理的更多相关文章
- MySQL库和表的管理
MySQL数据库服务配置好后,系统会有4个默认的数据库. information_schema:虚拟对象,其对象都保存在内存中performance_schema:服务器性能指标库mysql:记录用户 ...
- MySql数据库创建表
3.3.MySql数据库创建表 创建5个表: UserInfo用户基础表 Role 角色表 MenuInfo 菜单即控制表 Relation_Role_Menu 角色对应菜单关系表 RelaTion_ ...
- MySQL基础知识:创建MySQL数据库和表
虚构一个微型在线书店的数据库和数据,作为后续MySQL脚本的执行源,方便后续MySQL和SQL的练习. 在虚构这个库的过程中,主要涉及的是如何使用命令行管理 MySQL数据库对象:数据库.表.索引.外 ...
- 10款最好用的MySQL数据库客户端图形界面管理工具
MySQL Workbench 该工具由MySQL开发,是一个跨平台的可视化数据库设计工具.它是DBDesigner4项目备受期待的替代者,它是一个本地图形化工具,支持的操作系统包括Windows.L ...
- MySQL数据库分表的3种方法
原文地址:MySQL数据库分表的3种方法作者:dreamboycx 一,先说一下为什么要分表 当一张的数据达到几百万时,你查询一次所花的时间会变多,如果有联合查询的话,我想有可能会死在那儿了.分表的目 ...
- mysql数据库单表只有一个主键自增id字段,ibatis实现id自增
mysql数据库单表只有一个主键自增id字段,ibatis实现id自增 <insert id="autoid"> insert into user_id ...
- Vc数据库编程基础MySql数据库的表查询功能
Vc数据库编程基础MySql数据库的表查询功能 一丶简介 不管是任何数据库.都会有查询功能.而且是很重要的功能.上一讲知识简单的讲解了表的查询所有. 那么这次我们需要掌握的则是. 1.使用select ...
- Vc数据库编程基础MySql数据库的表增删改查数据
Vc数据库编程基础MySql数据库的表增删改查数据 一丶表操作命令 1.查看表中所有数据 select * from 表名 2.为表中所有的字段添加数据 insert into 表名( 字段1,字段2 ...
- mysql数据库user表host字段的%问题
搜索: mysql数据库user表host字段的%问题 连接:http://blog.csdn.net/xiaomengh/article/details/48706149 在mysql数据库中,使用 ...
随机推荐
- java 自定义异常输出信息(使用构造器)
throw new Exception("上传的脚本类型不匹配,当前只支持类unix系列的远程扫描,请上传后缀名为 .sh .pl 的脚本文件"); 这样就可以了,结合配置的异常信 ...
- Neo4j 第四篇:使用C#更新和查询Neo4j
本文使用的IDE是Visual Studio 2015 ,驱动程序是Neo4j官方的最新版本:Neo4j Driver 1.3.0 ,创建的类库工程(Project)要求安装 .NET Framewo ...
- linux查找进程pid并杀掉
命令:ps aux | grep `pwd` | grep -v grep | awk '{print $2}' | xargs kill -9 详细解释[我的有道云笔记,不知道为什么没法直接复制到 ...
- 验证Xpath和CSS 路径是否有效
XPath定位和CSS定位在Selenium中是经常使用的. 在FireFox浏览器和Chrome浏览器,可以使用这样的方法来验证定位是否准确. 以Chrome浏览器做范例 按键盘的F12 进入开发者 ...
- 镜像仓库管理:与Portus不得不说的那些事
背景: 目前在做一个云计算相关的项目,其中有这样一个需求:每个平台用户都有自己的docker镜像仓库(docker registry),用户可以对自己的镜像仓库的push/pull权限进行管理,也就是 ...
- leetcode之有序数组的平方
题目描述: 给定一个按非递减顺序排序的整数数组 A,返回每个数字的平方组成的新数组,要求也按非递减顺序排序. 示例 1: 输入:[-4,-1,0,3,10] 输出:[0,1,9,16,100] 示例 ...
- B1022. D进制的A+B
除基取余法 #include<bits/stdc++.h> using namespace std; stack<int> s; int main(){ long long a ...
- Leetcode题库——48.旋转图像
@author: ZZQ @software: PyCharm @file: rotate.py @time: 2018/11/16 15:41 要求:给定一个 n × n 的二维矩阵表示一个图像.将 ...
- MyEclipse同时配置多个tomcat
步骤: 1.可以把原有tomcat复制一份,或者下载新的tomcat,如果有必要的话,修改/conf/service.xml文件中tomcat的端口号,避免端口同时暂用出现错误 2.请看一下图片:打开 ...
- 基于 Java Web 的毕业设计选题管理平台--测试报告与用户手册
一.测试报告 1.兼容性测试 功能 描述 效果 Chrome浏览器 FireFox浏览器 IE浏览器 war 端浏览器 管理员登录 管理员用户登录功能 弹出“登录成功”对话框,进入到毕业设计选题管理平 ...