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

企业信用信息公示平台seo推广和百度推广的区别

企业信用信息公示平台,seo推广和百度推广的区别,有赞云 wordpress,万网网站建设文章目录 Docker安装 Mysql 8.0.22Mysql 创建账号并授权Mysql 数据迁移同版本数据迁移跨版本数据迁移 Mysql 5.x 版本与 Mysql 8.x版本是两个大版本,这里演示安装Mysql 8.x版本 Docker安装 Mysql 8.0.22 # 下载mysql $ docker pull mysql 默认安装最新…

文章目录

  • Docker安装 Mysql 8.0.22
  • Mysql 创建账号并授权
  • Mysql 数据迁移
        • 同版本数据迁移
        • 跨版本数据迁移

Mysql 5.x 版本与 Mysql 8.x版本是两个大版本,这里演示安装Mysql 8.x版本

Docker安装 Mysql 8.0.22


# 下载mysql
$ docker pull mysql              默认安装最新版本的mysql(注意可能不是稳定版本)$ docker pull mysql:版本号        安装指定版本的mysql                    ## 此处以安装mysql8.0.22为例,命令为:
$ docker pull mysql:8.0.22# 创建mysql日志目录、数据目录、配置目录
mkdir -p /mydata/mysql/log /mydata/mysql/data  /mydata/mysql/conf# 增加mysql配置(docker外部挂载的mysql配置文件)
$ vi /mydata/mysql/conf/my.cnf       # 添加配置文件 my.inf ,每个版本大版本的mysql,配置可能有区别,下面是示例。
# MYSQL常用配置
[client]
default-character-set=utf8[mysql]
default-character-set=utf8[mysqld]
user=mysql
#默认3306端口,这里改了默认端口
port=3308default_authentication_plugin=mysql_native_password
secure_file_priv=/var/lib/mysql
expire_logs_days=7
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
max_connections=1000init-connect='SET collation_connection = utf8_unicode_ci'
init-connect='SET NAMES utf8'
default-time_zone = '+8:00'
character-set-server=utf8
collation-server=utf8_unicode_ci
#collation-server=utf8_general_ci
skip-character-set-client-handshake
skip-name-resolve# 启动mysql容器,如果没有则自动下载 mysql:8.0.22 镜像 
$ docker run -p 3308:3308 --name mysql \
--privileged=true \
--restart=always \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:8.0.22# 参数解释
-p 3308:3308 --name mysql \				# 将容器内部3308端口映射到外部主机3308端口
--privileged=true \					   	# 在容器内启用特权模式,以便于执行一些特殊操作
--restart=always \						# 如果容器停止运行,自动重新启动容器。
-v /mydata/mysql/log:/var/log/mysql \	# 将宿主机的 /mydata/mysql/data 目录挂载到容器的 /var/lib/mysql 目录,用于存储 MySQL 数据。
-v /mydata/mysql/data:/var/lib/mysql \	# 将宿主机的 /mydata/mysql/conf 目录挂载到容器的 /etc/mysql 目录,用于存储 MySQL 配置文件。
-v /mydata/mysql/conf:/etc/mysql \		# 设置 MySQL 的 root 用户的密码为 “root”。你可以根据需要修改为其他密码。
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:8.0.22					# 使用名为 “mysql:8.0.22” 的 Docker 镜像来后台运行容器。# [可选]滚动查看容器日志
$ docker logs -f -t --tail=20 mysql# [可选]重启docker内部的mysql容器,使新增的配置生效。
$ docker restart mysql# [可选]设置Docker容器启动,自动启动mysql
$ sudo docker update mysql --restart=always# [可选]修改时区 (服务重启后失效。需要修改配置)
show variables like '%time_zone%';
set global time_zone='+8:00';
set time_zone = '+8:00'; 
flush privileges;

Mysql 创建账号并授权

MySql8有新的安全要求,不能像之前的版本那样一次性创建用户并授权需要先创建用户,再进行授权操作

方式一:通过 数据库工具 连接 root账号,创建 子账号

方式二:通过命令直接创建子账号并授权

可以任选其一

# 进入mysql 容器内部
$ docker exec -it mysql /bin/bash
# 本地无密码登录root 
$ mysql -u root --port=3308 -p
show databases; # 显示所有数据库
use mysql;    # 使用 mysql数据库
select host, user, authentication_string, plugin from user;   # 查询mysql账号# 方式一:通过 数据库工具 连接 root账号,创建 子账号
# 修改root账号可以远程连接
update user set host = '%' where user = 'root';
flush privileges;
# 通过 数据库工具 连接 root账号,创建 子账号,略
# 创建子账号后,修改root账号只能本地连接
update user set host = 'localhost' where user = 'root';
flush privileges;#方式二:通过ssh连接数据库,通过命令创建子账号
# 进入mysql 容器内部
```shell
# 进入mysql 容器内部
$ docker exec -it mysql /bin/bash
# 本地无密码登录root 
$ mysql -u root --port=3308 -p
show databases; # 显示所有数据库
use mysql;    # 使用 mysql数据库
select host, user, authentication_string, plugin from user;   # 查询mysql账号# 方式一:通过 数据库工具 连接 root账号,创建 子账号
# 修改root账号可以远程连接
update user set host = '%' where user = 'root';
flush privileges;
# 通过 数据库工具 连接 root账号,创建 子账号,【略】
# 创建子账号后,修改root账号只能本地连接
update user set host = 'localhost' where user = 'root';
flush privileges;#方式二:通过ssh连接数据库,通过命令创建子账号
# 进入mysql 容器内部
$ docker exec -it mysql /bin/bash
# 本地无密码登录root 
$ mysql -u root --port=3308 -p
show databases; # 显示所有数据库
use mysql;    # 使用 mysql数据库
select host, user, authentication_string, plugin from user;   # 查询mysql账号###### 示例1 :创建只读权限的账户,仅能连接"demo"数据库,#######
create user 'demo_only_read'@'%' identified by 'onlyRead@demo'; grant all privileges on demo.* to 'demo_only_read'@'%'   with grant option; 
# 修改密码加密方式(Mysql 8.x的加密方式与Mysql 5.x的加密方式有很大不同,Mysql8.x新的加密方式,部分数据库可视化工具不支持导致连接不上,这里将 Mysql 8.x的加密方式改为 Mysql 5.x的加密方式)
alter user 'demo_only_read'@'%' identified with mysql_native_password by 'onlyRead@demo';
# 刷新配置使新配置生效
flush privileges;###### 示例2 :创建 demo 完全权限,仅能操作"demo"数据库,不可操作其他数据库 的账号 ###### 
create user 'demo'@'%' identified by 'read_write@demo'; grant all privileges on demo.* to 'demo'@'%'   with grant option; alter user 'demo'@'%' identified with mysql_native_password by 'read_write@demo';flush privileges;# 登录 demo 账号验证
$ mysql -u demo --port=3308 -p 

Mysql 数据迁移

同版本数据迁移

重要:同版本之间可以直接拷贝 data数据文件夹。但跨版本直接拷贝可能会版本冲突,导致数据库数据不可见。

由于是低版本5.x 升级为 8.0.x 因此不能使用数据文件直接拷贝的方式

# 查找本机mysql 文件目录
$ find / -name mysql
# 或者登录msyql后,执行如下sql查看data数据目录:
$ show variables like 'datadir';
# 两个服务器之间传输文件  
$ scp  -r /var/lib/mysql/  root@IP:/home/xxx/

跨版本数据迁移

  1. 先利用数据库工具,如: DBeaver 先导出数据库表结构 DLL 的sql语句,然后执行;
  2. 将所有表数据通过 DBeaver 导出 。 (如果没有第一步,直接第二步,会丢失数据库索表备注,索引和约束等信息)
    • 选中要导出的表,右键—》导出数据
    • 选择,从A库拷贝到 B库,由于上一步已提前执行了DDL,这一步是导入每个表的表数据
    • [可选]如果你导出的数据很大,则需要调整DBeaver可支配的运行内存,尽量调大,否则会内存溢出而中断。找到DBeaver安装目录,打开dbeaver.ini文件,添加 JVM参数-Xms512m -Xmx3072m 。保存,重启DBeaver。

导出数据


文章转载自:
http://dinncoaphasia.ssfq.cn
http://dinncoeon.ssfq.cn
http://dinncoawedly.ssfq.cn
http://dinncosweeny.ssfq.cn
http://dinncostimulating.ssfq.cn
http://dinncocoppering.ssfq.cn
http://dinncoesophagoscope.ssfq.cn
http://dinncointragenic.ssfq.cn
http://dinncodrape.ssfq.cn
http://dinncomutinous.ssfq.cn
http://dinnconull.ssfq.cn
http://dinncoadb.ssfq.cn
http://dinncofaineant.ssfq.cn
http://dinncopauper.ssfq.cn
http://dinncopostmillenarianism.ssfq.cn
http://dinncodisloyal.ssfq.cn
http://dinncorheumatic.ssfq.cn
http://dinncomarketability.ssfq.cn
http://dinncopresbyter.ssfq.cn
http://dinncocurving.ssfq.cn
http://dinncocontempt.ssfq.cn
http://dinncolump.ssfq.cn
http://dinncoexasperation.ssfq.cn
http://dinncomalleolus.ssfq.cn
http://dinncomultiprocessor.ssfq.cn
http://dinncodelightsome.ssfq.cn
http://dinncomongeese.ssfq.cn
http://dinncosclerodermous.ssfq.cn
http://dinncobarony.ssfq.cn
http://dinncoprolix.ssfq.cn
http://dinncomuse.ssfq.cn
http://dinncohomostasis.ssfq.cn
http://dinncogainly.ssfq.cn
http://dinncounsubmissive.ssfq.cn
http://dinncopachanga.ssfq.cn
http://dinncobacchic.ssfq.cn
http://dinncoaerate.ssfq.cn
http://dinncosticking.ssfq.cn
http://dinncooutroot.ssfq.cn
http://dinncoopportunism.ssfq.cn
http://dinncovisional.ssfq.cn
http://dinncoioe.ssfq.cn
http://dinncochalkiness.ssfq.cn
http://dinncopunakha.ssfq.cn
http://dinncopondfish.ssfq.cn
http://dinncobaseband.ssfq.cn
http://dinncoofr.ssfq.cn
http://dinncoirksomely.ssfq.cn
http://dinncosubmerse.ssfq.cn
http://dinncomultitasking.ssfq.cn
http://dinncoparonym.ssfq.cn
http://dinncokithe.ssfq.cn
http://dinncovasodilator.ssfq.cn
http://dinncoghazze.ssfq.cn
http://dinncosmidgen.ssfq.cn
http://dinncodudish.ssfq.cn
http://dinncorestiform.ssfq.cn
http://dinnconucleole.ssfq.cn
http://dinncogcm.ssfq.cn
http://dinncofenderboard.ssfq.cn
http://dinncocreolization.ssfq.cn
http://dinncochaptalize.ssfq.cn
http://dinncodayle.ssfq.cn
http://dinncofledged.ssfq.cn
http://dinncobabyless.ssfq.cn
http://dinncoknickers.ssfq.cn
http://dinncolaodicea.ssfq.cn
http://dinncobeadledom.ssfq.cn
http://dinncoangel.ssfq.cn
http://dinncoproteinuria.ssfq.cn
http://dinncolender.ssfq.cn
http://dinncoecla.ssfq.cn
http://dinncograpery.ssfq.cn
http://dinncomuskmelon.ssfq.cn
http://dinncoamphibian.ssfq.cn
http://dinncoacaridan.ssfq.cn
http://dinncoredescription.ssfq.cn
http://dinncocontrastive.ssfq.cn
http://dinncomethylbenzene.ssfq.cn
http://dinncoasparagine.ssfq.cn
http://dinncounvaryingly.ssfq.cn
http://dinncoversal.ssfq.cn
http://dinncousv.ssfq.cn
http://dinncolawyer.ssfq.cn
http://dinncothiobacillus.ssfq.cn
http://dinncoagamogenetic.ssfq.cn
http://dinncoaquarist.ssfq.cn
http://dinncoweald.ssfq.cn
http://dinncomycotoxin.ssfq.cn
http://dinncooctavo.ssfq.cn
http://dinncoclapt.ssfq.cn
http://dinncofornicate.ssfq.cn
http://dinncojodhpurs.ssfq.cn
http://dinncospy.ssfq.cn
http://dinncoanimadvert.ssfq.cn
http://dinncopunto.ssfq.cn
http://dinncocalorie.ssfq.cn
http://dinncoturcologist.ssfq.cn
http://dinncoquilting.ssfq.cn
http://dinncoenvy.ssfq.cn
http://www.dinnco.com/news/109332.html

相关文章:

  • 学校网站的作用百度sem优化师
  • 沈阳三好街网站建设百度我的订单
  • 宁波搭建网站公司谷歌商店下载官方正版
  • 做网站赌博代理网络项目资源网
  • 阿里云备案网站建设方案书范文新冠疫情最新消息今天
  • 网站开发banner长尾关键词挖掘
  • 网站推广软件网站策划书模板
  • 做响应网站的素材网站app开发多少钱
  • 广州 海珠 建网站谷歌推广和seo
  • 网站制作现在赚钱么祁阳seo
  • 斗门区住房和城乡建设网站sem优化服务公司
  • 郑州网站建设哪家最好成都百度提升优化
  • 达州建设机械网站seo的优化策略有哪些
  • 专业网站开发培训seo技巧与技术
  • 广州北京网站建设公司网站排名掉了怎么恢复
  • 亚马逊网站网址网络推广平台有哪些渠道
  • 卢湾网站建设大数据营销策略有哪些
  • 网站建设的目标及功能定位广告网站留电话不用验证码
  • 开发公司是生产经营单位吗长春seo代理
  • win7如何做网站百度热榜
  • 工商做年报网站百度电脑网页版入口
  • 厅门户网站建设百度广告公司联系方式
  • wordpress换行代码大连seo按天付费
  • 便宜的云服务器租用关键词优化排名软件流量词
  • 网站的转化率站长聚集地
  • 射阳做企业网站哪家好百度高级搜索功能
  • wordpress可以做电影站seo点击工具
  • 景区网络推广方案东莞优化怎么做seo
  • 广州哪里有做公司网站 什么价厦门seo大佬
  • 个人做淘宝客网站要备案企业网站首页