关系型数据库:以表作为实体,以主键和外键关系作为联系的一种数据结构. 主键:在关系型数据库中,用一个唯一的标识符来标志每一行,这个标识符就是主键.主键有两个特点:非空和不能重复. 外键:在关系型数据库中,外键就是用来表达表与表之间的关系.联系,通过主外键关系,建立实体之间的联系. 表之间的三种基本关系模型: ① 一对多关系: 一条主表记录对应多条从表记录,一条从表记录对应一条主表记录. ② 一对一关系: 一条主表记录对应一条从表记录,一条从表记录对应一条主表记录. ③ 多对多关系: 一条主表记录
给targetUserName用户授予databaseName单个数据库权限 grant all privileges on databaseName.* to targetUserName@"%" identified by 'targetPassword';grant select,delete,update,insert on databaseName.* to targetUserName@"%" identified by 'targetPassword'
将一般的用户加入sudo组is not in the sudoers file. This incident will be reported 解决方法 在一般用户下执行sudo命令提示xxx is not in the sudoers file. This incident will be reported.解决方法: $whereis sudoers -------找出文件所在的位置,默认都是/etc/sudoers 有时候我们只需要执行一条root权限的命令也要su到roo