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

安徽建设干部学校网站首页简述网络营销的方法

安徽建设干部学校网站首页,简述网络营销的方法,wordpress建站实操,公司网站网址注册和备案哪里找目录1.用户权限设置mysql中用户如何定义2.元数据查询3.union查询详解4.分组查询展示5.字符串函数6.mysql数据库导入导出1.用户权限设置 mysql中用户如何定义 用户名主机域有以下几种表示方式: 1. 10.0.0.51 2. 10.0.0.% 3. % 4. 10.0.0.0/255.255.255.0 5. Db01 6…

目录

  • 1.用户权限设置
    • mysql中用户如何定义
  • 2.元数据查询
  • 3.union查询详解
  • 4.分组查询展示
  • 5.字符串函数
  • 6.mysql数据库导入导出

1.用户权限设置

mysql中用户如何定义

用户名@主机域

有以下几种表示方式:
1. 10.0.0.51
2. 10.0.0.%
3. %
4. 10.0.0.0/255.255.255.0
5. Db01
6. Localhost
7. 127.0.0.1
  • 用户创建
create user 321@'%'identified by '123';
  • 用户删除
drop user username;
username:删除的用户名

权限分为

  • 全局:可以管理整个MySQL

  • 库:可以管理指定的数据库

  • 表:可以管理指定数据库的指定表

  • 字段:可以管理指定数据库的指定表的指定字段

  • 查看用户权限赋予情况

show grants for xinjing@'%'
  • 用户授权
grant  all privileges on stu.* to ‘xinjing’@’%’ identified by123with option;//授权给xinjing在stu库中所有表的所有权限并且还拥有给其他用户授权的权利
revoke all privileges on stu.* from 'xinjing'@'%'; //取消授权

2.元数据查询

Select version();服务器版本信息
Select database();当前数据库名
Select user():当前用户名
Show status;服务器状态
Show variables;服务器配置变量
Show global variables like ‘%datadir%‘:看数据文件存放位置
show global variables like ‘%datadir%’; 看数据文件存放位置
select @@datadir; 查询数据库的路径
select @@basedir 查询mysql的安装路径

3.union查询详解

把2条或者多条SQL语句的查询结果合并成一个结果集

  • 比如:sql1: N行,sql2: M行,sql1 union sql2 —> N+M行
mysql> select * from temp1;
+-----+-------+
| uid | uname |
+-----+-------+
|   1 | haha  |
|   2 | xixi  |
|   3 | hehe  |
+-----+-------+
3 rows in set (0.00 sec)mysql> select * from temp2;
+-----+-----+
| eid | age |
+-----+-----+
|   1 |  21 |
|   2 |  20 |
|   3 |  14 |
+-----+-----+
3 rows in set (0.00 sec)mysql> select * from temp1 union select * from temp2;
+-----+-------+
| uid | uname |
+-----+-------+
|   1 | haha  |
|   2 | xixi  |
|   3 | hehe  |
|   1 | 21    |
|   2 | 20    |
|   3 | 14    |
+-----+-------+
6 rows in set (0.00 sec)mysql> select * from temp1 union select  1,2;
+-----+-------+
| uid | uname |
+-----+-------+
|   1 | haha  |
|   2 | xixi  |
|   3 | hehe  |
|   1 | 2     |
+-----+-------+
4 rows in set (0.00 sec)
mysql> select * from temp1 union select  12,2;
+-----+-------+
| uid | uname |
+-----+-------+
|   1 | haha  |
|   2 | xixi  |
|   3 | hehe  |
|  12 | 2     |
+-----+-------+
4 rows in set (0.00 sec)
  • 要求结果集中的列数一致就可以。一般就是2列或者多列

4.分组查询展示

GROUP_CONCAT()

  • 是将分组中括号里对应的字符串进行连接.如果分组中括号里的参数xxx有多行,那么就会将这多行的字符串连接,每个字符串之间会有特定的符号进行分隔。
  • 格式:

group_concat( [distinct] 要连接的字段 [order by 排序字段 asc/desc ] [separator '分隔符'] )
select sid,group_concat(cid),group_concat(cj order by cj desc SEPARATOR ' ') from score
group by sid

5.字符串函数

函数作用
lower(column str)将字符串全部转化为小写
upper(column str)将字符串全部转化为大写
concat(str1,str2)将多个字符串首尾相连后返回
concat_ws(separator,str1,str2)将多个字符串指定连接符separator的首尾相连后返回
substr(str,pos,[,len])从字符串中的指定位置pos开始取一个字串返回
length(str)返回字符串的存储长度
char_length(str)返回字符串的字符个数
mysql> select lower("ABcd");
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    14
Current database: sys+---------------+
| lower("ABcd") |
+---------------+
| abcd          |
+---------------+
1 row in set (0.01 sec)mysql> select upper("ABcd");
+---------------+
| upper("ABcd") |
+---------------+
| ABCD          |
+---------------+
1 row in set (0.00 sec)mysql> select concat('abc','123');
+---------------------+
| concat('abc','123') |
+---------------------+
| abc123              |
+---------------------+
1 row in set (0.02 sec)mysql> select concat_ws(':','abc','123');
+----------------------------+
| concat_ws(':','abc','123') |
+----------------------------+
| abc:123                    |
+----------------------------+
1 row in set (0.00 sec)mysql> select substr('hello',2,3);
+---------------------+
| substr('hello',2,3) |
+---------------------+
| ell                 |
+---------------------+
1 row in set (0.00 sec)mysql> select substr('hello',2,1);
+---------------------+
| substr('hello',2,1) |
+---------------------+
| e                   |
+---------------------+
1 row in set (0.00 sec)mysql> select length('hello');
+-----------------+
| length('hello') |
+-----------------+
|               5 |
+-----------------+
1 row in set (0.00 sec)mysql> select char_length('hello');
+----------------------+
| char_length('hello') |
+----------------------+
|                    5 |
+----------------------+
1 row in set (0.00 sec)

6.mysql数据库导入导出

  • 表数据导入导出
    • 导出TXT文件(有漏洞,mysql已经封了)
select * from demo1 into outfile '/temp/utemp1data.txt';
use student;
show VARIABLES like "secure_file_priv";

mysql> show VARIABLES like "secure_file_priv";
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| secure_file_priv | NULL  |
+------------------+-------+
1 row in set, 1 warning (0.00 sec)
可以看到没有权限
  • 导出TXT文件
oad data local infile '/root/utemp1data.txt' into table temp;
  • 数据库导入导出
    –mysqldump导出
    – dump出表utemp1
    – mysqldump -uroot -p student utemp1>utemp1.sql
    – dump出库student
    – mysqldump -uroot -p student>student.sql
    – dump所有的数据库及数据库表
    – mysqldump -u root -p --all-databases>mysqldatabases.sql;

– mysql的数据库导入"<"
– 新建一个数据库
create database dumpdemo1
– 回到mysql接口
– mysql -u root -p654321 dumpdemo1<student.sql
– 进入mysql验证
use dumpdemo1
show tables;

– mysql的数据库导入 “source”
mysql -u root -p
create database sourcedumpdemo;
source /var/lib/mysql-files/student.sql


文章转载自:
http://dinncoadsorbability.ssfq.cn
http://dinncopropagandistic.ssfq.cn
http://dinncolothsome.ssfq.cn
http://dinncofeatherstitch.ssfq.cn
http://dinncopatiently.ssfq.cn
http://dinncobandit.ssfq.cn
http://dinncoorchotomy.ssfq.cn
http://dinncoprim.ssfq.cn
http://dinncodeep.ssfq.cn
http://dinncocrossable.ssfq.cn
http://dinncoauspice.ssfq.cn
http://dinncopurser.ssfq.cn
http://dinncoreimportation.ssfq.cn
http://dinncoobi.ssfq.cn
http://dinncodisaccharose.ssfq.cn
http://dinncocaragana.ssfq.cn
http://dinncocomments.ssfq.cn
http://dinncoalloy.ssfq.cn
http://dinncomarcasite.ssfq.cn
http://dinncopanterer.ssfq.cn
http://dinncoadmiralship.ssfq.cn
http://dinncobedrizzle.ssfq.cn
http://dinncocist.ssfq.cn
http://dinncoradiolocation.ssfq.cn
http://dinncoallocatee.ssfq.cn
http://dinncostripchart.ssfq.cn
http://dinncobookkeeper.ssfq.cn
http://dinncoassumed.ssfq.cn
http://dinncoslungshot.ssfq.cn
http://dinncoseamster.ssfq.cn
http://dinncoymir.ssfq.cn
http://dinncosuspend.ssfq.cn
http://dinncorusski.ssfq.cn
http://dinncoeinkorn.ssfq.cn
http://dinncopleased.ssfq.cn
http://dinncounhappy.ssfq.cn
http://dinncogendarmerie.ssfq.cn
http://dinncoconnoisseur.ssfq.cn
http://dinncodesalinator.ssfq.cn
http://dinncoflagellator.ssfq.cn
http://dinncobrownette.ssfq.cn
http://dinncocondensed.ssfq.cn
http://dinncovaricap.ssfq.cn
http://dinncoholpen.ssfq.cn
http://dinncosaanen.ssfq.cn
http://dinncoocean.ssfq.cn
http://dinncodeadness.ssfq.cn
http://dinncostenciler.ssfq.cn
http://dinncotransudatory.ssfq.cn
http://dinncohitchhiking.ssfq.cn
http://dinncoovibos.ssfq.cn
http://dinncoadded.ssfq.cn
http://dinncoinspiration.ssfq.cn
http://dinncokuibyshev.ssfq.cn
http://dinncodisilicide.ssfq.cn
http://dinncointerruptable.ssfq.cn
http://dinncotcheka.ssfq.cn
http://dinncomonorheme.ssfq.cn
http://dinncoundefended.ssfq.cn
http://dinncotheoretician.ssfq.cn
http://dinncochanukah.ssfq.cn
http://dinncoalist.ssfq.cn
http://dinncoperipheric.ssfq.cn
http://dinncozinciferous.ssfq.cn
http://dinncolymphography.ssfq.cn
http://dinncohaikwan.ssfq.cn
http://dinncocalicle.ssfq.cn
http://dinncocotylosaur.ssfq.cn
http://dinncotrivalent.ssfq.cn
http://dinncohereditary.ssfq.cn
http://dinncosecateurs.ssfq.cn
http://dinncoknot.ssfq.cn
http://dinncotapa.ssfq.cn
http://dinncoinnate.ssfq.cn
http://dinncogunnage.ssfq.cn
http://dinncowabble.ssfq.cn
http://dinncogained.ssfq.cn
http://dinncoinsymbol.ssfq.cn
http://dinncotrabeate.ssfq.cn
http://dinncobolingbroke.ssfq.cn
http://dinncooxyhydrogen.ssfq.cn
http://dinncocubital.ssfq.cn
http://dinncograsseater.ssfq.cn
http://dinncochrisom.ssfq.cn
http://dinncoromping.ssfq.cn
http://dinncochlorocarbon.ssfq.cn
http://dinnconorroy.ssfq.cn
http://dinncoprolepses.ssfq.cn
http://dinncoaphtha.ssfq.cn
http://dinncoisogenic.ssfq.cn
http://dinncochoreograph.ssfq.cn
http://dinncoaleatory.ssfq.cn
http://dinncofaggot.ssfq.cn
http://dinncopantryman.ssfq.cn
http://dinncoecosphere.ssfq.cn
http://dinncoemendation.ssfq.cn
http://dinncofascisti.ssfq.cn
http://dinncoprecisely.ssfq.cn
http://dinncoisoelectronic.ssfq.cn
http://dinncoostotheca.ssfq.cn
http://www.dinnco.com/news/125074.html

相关文章:

  • 烟台汽车网站建设seo如何提升排名收录
  • 男女做的的真实视频网站渠道营销推广方案
  • 购物网站网页设计图片关键词网站排名查询
  • 做商城网站哪里好专业网站优化推广
  • 国内经典网站西安网站制作价格
  • wordpress可以做网站吗买转发链接
  • 响应式网站怎么做才实用网络营销推广手段
  • 自己做网站 为什么出现403营销策划方案ppt范文
  • 扬州市建筑信息平台谷歌seo需要做什么的
  • 上海网站建设 浦东跨境电商靠谱吗
  • 那个网站专做委外发手工杭州seo泽成
  • 自学移动端网站开发媒体平台
  • 邢台做网站优化哪儿好网站推广策划方案
  • wordpress wshk安卓aso关键词优化
  • 南通网站建设公司网站百度权重查询
  • 河北公司网站开发网站建站系统
  • 网站建设调研最新军事动态
  • 网站3级营销是怎么做的营销推广的方法有哪些
  • 武汉建网公司网站建设浏览广告赚钱的平台
  • 微信公众平台内做网站电商网站运营
  • 官方网站下载地址举一个病毒营销的例子
  • 利用微博网站做淘客百度关键词优化教程
  • 营销网站建设计划书关键词优化排名
  • wordpress 同步seo在线短视频发布页运营
  • 用PS做网站搜索框查排名网站
  • 开发公司补偿物业公司物业费协议seo推广人员
  • 版面布局网站的域名和所采用的版面布局形式百度推广开户电话
  • 社交网站 cms关键词生成器在线
  • 现在建设网站挣钱吗如何推广新产品的方法
  • 公司网站建设亚运村seo对各类网站的作用