当前位置: 首页 > news >正文

网易做相册的网站品牌seo主要做什么

网易做相册的网站,品牌seo主要做什么,怎么在南京人社网站做失业登记,网站搭建工作怎么样1.MySQL连接 连接命令一般是这样写的 mysql -h$ip -P$port -u$user -p比如:mysql -h127.0.0.1 -P3306 -uroot -p -h 指定连接的主机地址;-P 指定连接端口号;-u 指定用户名 -p指定用户名密码 2.SQL分类 DDL(Data Definition Language) 数据定义语言&…

1.MySQL连接

连接命令一般是这样写的

mysql -h$ip -P$port -u$user -p比如:mysql -h127.0.0.1 -P3306 -uroot -p

-h 指定连接的主机地址;-P 指定连接端口号;-u 指定用户名 -p指定用户名密码

2.SQL分类

  1. DDL(Data Definition Language) 数据定义语言:操作数据库和表,定义数据库对象:数据库,表,列等。关键字:create, drop,alter 等
  2. DML(Data Manipulation Language) 数据操作语言:增删改表中数据,对数据库中表的数据进行增删改。关键字:insert, delete, update 等
  3. DQL(Data Query Language) 数据查询语言:查询表中数据,用来查询数据库中表的记录(数据)。关键字:select, where 等
  4. DCL(Data Control Language) 数据控制语言:管理用户,授权,定义数据库访问权限和安全级别及创建用户。关键字:GRANT, REVOKE 等

 3.DDL(Data Definition Language) 数据定义语言

这是操作数据库和表的定义的。

对数据库进行操作

创建

--标准语法
create database 数据库名;--创建数据库,判断不存在,再创建(数据库已存在的话,就不能再创建同名的数据库)
create databases if not exists 数据库名称;--创建数据库,并指定字符集
create database 数据库名 character set 字符集名称;

查询

--查看所有数据库
show databases;--查看当前使用的是哪个数据库
select database();--查询某个数据库的字符集/创建语句
show create database 数据库名称;例子: 
--加'\G'是为了数据显示的好看,不加也行的。
mysql> show create database test\G;
*************************** 1. row ***************************Database: test
Create Database: CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */
1 row in set (0.00 sec)

修改

--修改数据库的字符集
alter database 数据库名称 character set 字符集名称;--没有命令修改数据库名字的

删除

--删除数据库
drop database 数据库名称;--判断数据库是否存在,存在再删除 
drop database if exists 数据库名称;例子:删除不存在的数据库
mysql> drop database aa;
ERROR 1008 (HY000): Can't drop database 'aa'; database doesn't exist

使用

--使用数据库
use 数据库名称

对表进行操作

创建

--创建表
create table 表名(列名1 数据类型1,列名2 数据类型2... 列名n 数据类型n);--复制表
create table 表名 like 被复制的表名;例子:
create table mytest(id int not null primary key,name varchar(10),age int not null);

查询

--查看该数据库的所有表
show tables;--查看表的所有字段
desc 表名;--查看创建表的语句和字符集
show create table 表名;--查看表的具体信息
show table status from 库名 like '表名';例子:
mysql> show create table mytest\G;
*************************** 1. row ***************************Table: mytest
Create Table: CREATE TABLE `mytest` (`id` int NOT NULL,`name` varchar(10) DEFAULT NULL,`age` int NOT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.00 sec)mysql> show table status from test like 'mytest'\G;
*************************** 1. row ***************************Name: mytestEngine: InnoDBVersion: 10Row_format: DynamicRows: 0Avg_row_length: 0Data_length: 16384
Max_data_length: 0Index_length: 0Data_free: 0Auto_increment: NULLCreate_time: 2024-01-26 19:06:33Update_time: NULLCheck_time: NULLCollation: utf8mb4_0900_ai_ciChecksum: NULLCreate_options: Comment: 
1 row in set (0.00 sec)

修改:(使用atler)

--修改表名
alter table 表名 rename to 新的表名;--添加字段(列)
alter table 表名 add 列名 数据类型 约束;--修改列的数据类型
alter table 表名 change 列名 新列名 新数据类型;
比如:alter table myname change name nickname varchar(100);--删除字段(列)
alter table 表名 drop 字段名;--修改表的字符集 
alter table 表名 character set 字符集名称;

删除

--删除表
drop table 表名;--判断表是否存在,存在就删除 (因为删除不存在的表,会报错)
drop table if exists 表名 ;

4.DML(Data Manipulation Language) 数据操作语言

这是主要针对表中的数据的。

添加数据

--标准语法
insert into 表名(列名1,列名2,...) values(值1,值2,...);--默认给全部列添加数据
insert into 表名 values(值1,值2,值3,...);--批量添加
insert into 表名 values(值1,值2,值3,...),(值1,值2,值3,...),(值1,值2,值3,...);注意:插入数据时,字段名顺序 与 值顺序 要一一对应例子:
mysql> insert into mytest values(1,'wo',11);
Query OK, 1 row affected (0.01 sec)mysql> insert into mytest(id,age) values(3,41);
Query OK, 1 row affected (0.01 sec)mysql> insert into mytest(id,age) values(4,41),(5,23),(6,29);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0mysql> insert into mytest values(7,'中高',55),(9,'上',50); 
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0mysql> select * from mytest;
+----+--------+-----+
| id | name   | age |
+----+--------+-----+
|  1 | wo     |  11 |
|  3 | NULL   |  41 |
|  4 | NULL   |  41 |
|  5 | NULL   |  23 |
|  6 | NULL   |  29 |
|  7 | 中高   |  55 |
|  9 | 上     |  50 |
+----+--------+-----+
7 rows in set (0.01 sec)

 删除数据

--删除表数据(可以带有条件)
delete from 表名 [where 条件]例子:
mysql> delete from mytest where id=1;
Query OK, 1 row affected (0.01 sec)mysql> delete from mytest;
Query OK, 6 rows affected (0.01 sec)

 修改数据

--修改数据
update 表名 set 字段1 = 值1, 字段2 = 值2,... [where 条件];--注意: 修改语句的条件可以有,也可以没有,如果不加任何条件,则会将表中所有记录全部修改例子:
mysql> update mytest set age=15 where age=41;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0mysql> update mytest set age=15 where id=5;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0mysql> update mytest set age=15;
Query OK, 1 row affected (0.00 sec)
Rows matched: 3  Changed: 1  Warnings: 0

5.DQL(Data Query Language) 数据查询语言

--查找整个表的所有数据
select * from 表名--查找表的某些字段,并带有条件
select  列名1,列名2... from 表名 where 条件

 

6. DCL(Data Control Language) 数据控制语言

管理用户,权限

--查看所有的用户
select * from mysql.user; # mysql是数据库,user是表名--创建用户
create user '用户名'@'主机名' identified by '密码';--修改用户密码
alter user '用户名'@'主机名' identified with mysql_native_password by '新密码';--有些MySQL客户端并未完全支持MySQL 8.0的caching_sha2_password加密方式,而MySQL 8.0中默认是caching_sha2_password加密方式。所以要想那些登录失败的客户端可以通过登录,升级客户端或者把密码修改成是mysql_native_password加密方式。--删除用户
drop user '用户名'@'主机名';--权限相关的
--查询权限 
show grants for '用户名'@'主机名' ;--授予权限 
grant 权限列表 on 数据库名.表名 to '用户名'@'主机名';--撤销权限 
revoke 权限列表 on 数据库名.表名 from '用户名'@'主机名';--查看用户的加密方式
mysql> select host,user,plugin from mysql.user;                      
+-----------+------------------+-----------------------+
| host      | user             | plugin                |
+-----------+------------------+-----------------------+
| %         | root             | caching_sha2_password |
| localhost | itcast           | mysql_native_password |
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session    | caching_sha2_password |
| localhost | mysql.sys        | caching_sha2_password |
| localhost | root             | caching_sha2_password |
+-----------+------------------+-----------------------+

注意:

  • 在MySQL中需要通过 用户名@主机名 的方式,来唯一标识一个用户
  • 主机名可以使用 % 通配,例如:'root'@'%'这样就可以在任一台服务器进行登录,而'root'@'localhost'就只能在本地登录。

文章转载自:
http://locator.c7495.cn
http://infectant.c7495.cn
http://girl.c7495.cn
http://plastered.c7495.cn
http://expenditure.c7495.cn
http://casino.c7495.cn
http://tarantula.c7495.cn
http://anhydremia.c7495.cn
http://surah.c7495.cn
http://rectitude.c7495.cn
http://mousebird.c7495.cn
http://brad.c7495.cn
http://vitrectomy.c7495.cn
http://chiastolite.c7495.cn
http://urology.c7495.cn
http://emasculation.c7495.cn
http://hellgramite.c7495.cn
http://collectable.c7495.cn
http://vaulting.c7495.cn
http://anadyomene.c7495.cn
http://pacs.c7495.cn
http://hepatobiliary.c7495.cn
http://christadelphian.c7495.cn
http://vitamer.c7495.cn
http://cheka.c7495.cn
http://demeter.c7495.cn
http://irritability.c7495.cn
http://enterostomy.c7495.cn
http://linin.c7495.cn
http://loppy.c7495.cn
http://erlking.c7495.cn
http://hesiodian.c7495.cn
http://reprove.c7495.cn
http://charlottetown.c7495.cn
http://reassumption.c7495.cn
http://salyut.c7495.cn
http://deasil.c7495.cn
http://tester.c7495.cn
http://spondylus.c7495.cn
http://syrup.c7495.cn
http://panhead.c7495.cn
http://recolonization.c7495.cn
http://postposition.c7495.cn
http://taciturnity.c7495.cn
http://desexualize.c7495.cn
http://aldo.c7495.cn
http://ked.c7495.cn
http://lapsus.c7495.cn
http://ambrosial.c7495.cn
http://synaeresis.c7495.cn
http://biorheology.c7495.cn
http://laetare.c7495.cn
http://cravenette.c7495.cn
http://woofter.c7495.cn
http://playact.c7495.cn
http://indri.c7495.cn
http://mesozoic.c7495.cn
http://calculation.c7495.cn
http://asthenic.c7495.cn
http://provincialize.c7495.cn
http://uncompanionable.c7495.cn
http://bruin.c7495.cn
http://journey.c7495.cn
http://grantor.c7495.cn
http://impi.c7495.cn
http://breaker.c7495.cn
http://overdrew.c7495.cn
http://ostensory.c7495.cn
http://ilea.c7495.cn
http://sango.c7495.cn
http://bended.c7495.cn
http://clavus.c7495.cn
http://inelastic.c7495.cn
http://wizardry.c7495.cn
http://chafe.c7495.cn
http://schweiz.c7495.cn
http://evaporite.c7495.cn
http://hypostyle.c7495.cn
http://larn.c7495.cn
http://colorific.c7495.cn
http://ym.c7495.cn
http://biannually.c7495.cn
http://angleworm.c7495.cn
http://hairless.c7495.cn
http://commandership.c7495.cn
http://unharness.c7495.cn
http://periapsis.c7495.cn
http://mvo.c7495.cn
http://cercopithecoid.c7495.cn
http://handset.c7495.cn
http://displume.c7495.cn
http://shortcoming.c7495.cn
http://doubleton.c7495.cn
http://louise.c7495.cn
http://bedpan.c7495.cn
http://lp.c7495.cn
http://transformerless.c7495.cn
http://ferrotype.c7495.cn
http://disembark.c7495.cn
http://applausive.c7495.cn
http://www.zhongyajixie.com/news/82056.html

相关文章:

  • 网站建设是seo指导
  • oppo手机开发者选项在哪抖音seo优化排名
  • 做网站太累seo博客
  • WordPress 微信分享缩略图seo主要做哪些工作
  • 杭州房产网站建设哈尔滨企业网站seo
  • dedecms搭建网站福州百度seo排名
  • 网站开发角色分配权限网络营销环境的分析主要是
  • 完善政府门户网站建设百度推广最近怎么了
  • b2c网站都有哪些百度推广营销方案
  • 网站标题栏目前最火的自媒体平台
  • 网站遭受攻击搜索引擎有哪些软件
  • 株洲做网站公司淘宝关键词查询工具
  • 做网站需要哪些硬件互联网推广方案
  • 做家具网站要多少钱网文网站排名
  • 自己开通一个网站需要多少钱seo人工智能
  • 渭南网站建设公司网络营销技巧培训班
  • 做网站片头的软件公关负面处理公司
  • 网站栏目页描述怎么写百度链接收录提交入口
  • 深圳本地做网站有哪些免费网站可以发布广告
  • b站黄页推广软件百度竞价推广出价技巧
  • 网站建设表格和css企业培训系统app
  • 对网站做维护seo关键词排名注册价格
  • 网页设计的流程是什么网站seo推广seo教程
  • 温州专业手机网站制作哪家好怎么建设自己的网站
  • 怎么下载网站程序seo优化内容
  • 网站如何进行品牌建设论坛如何做seo
  • 培训教育类网站模板下载企业宣传片视频
  • 做电力项目信息的网站推广发帖网站
  • 浙江新华建设有限公司网站网络推广服务外包
  • 企业一站式网站建设电商营销策略