1、下载mysql绿色版压缩包
https://dev.mysql.com/downloads/mysql/

2、解压到安装目录后,在根目录创建data文件夹

3、把mysql下的bin目录添加到环境变量

4、根目录创建my.ini文件,并拷贝以下代码,并修改basedir和datadir路径

# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="D:\GreenSoft\MySQL\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install mysql --defaults-file="D:\GreenSoft\MySQL\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start mysql
#
#
# Guildlines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
# [client]
no-beep # pipe
# socket=0.0
port= [mysql] default-character-set=utf8 [mysqld] # 这是8..4的新特性 caching_sha2_password,在linux上面使用命宁 mysql -uroot -proot 可以链接,但是使用windows下面的navict链接不成功
default_authentication_plugin = mysql_native_password # These are commonly set, remove the # and set as required.
character-set-server = utf8
basedir = D:\Program Files\mysql-8.0.-winx64
datadir = D:\Program Files\mysql-8.0.-winx64\data
port =
server_id = # Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at % of total RAM for dedicated server, else %.
innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin # General and Slow logging.
log-output=FILE
general-log=
general_log_file="CUPID.log"
slow-query-log=
slow_query_log_file="CUPID-slow.log"
long_query_time= # Binary Logging.
# log-bin # Error Logging.
log-error="CUPID.err" # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M # 8.0.4版本的时候,用的是这个sql_mode,但在8..11版本中会报错,改成下面那个
# sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION" default-storage-engine=INNODB innodb_log_file_size = 512M
binlog_format='MIXED'
max_allowed_packet = 1G
# innodb_file_per_table =
# innodb_file_format = Barracuda # 大小写是否敏感,0敏感 Linux下默认为0, Windows下默认值是 , MacOS下默认值是 (0敏感)
lower_case_table_names = innodb_strict_mode =
max_connections =

5、mysqld --install   //安装MYSQL服务

6、mysqld --initialize --user=mysql --console     //初始化mysql,并记下临时密码

7、net start mysql   //启动mysql服务

8、SET PASSWORD = '123456';    //修改密码
或者使用   ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

9、CREATE USER 'username'@'host' IDENTIFIED BY 'password';  (创建异地登录用户)

例:CREATE USER 'backup'@'10.0.0.2' IDENTIFIED BY '123456';  (用户名为backup,密码123456,只允许10.0.0.2远程登录)

10、GRANT privileges ON databasename.tablename TO 'username'@'host';(用户授权)

例:GRANT select,lock tables ON db1.* TO 'backup'@'%';(授权db1数据库的select和lock tables权限给backup用户)


客户端下使用mysqldump备份

1、下载mysql绿色版,解压后,进入bin目录(客户端可以不用安装服务和初始化)

2、mysqldump -h主机名  -P端口 -u用户名 -p密码  数据库名 > 文件名.sql

mysqldump -h10.0.0.1  -P3310 -ubackup -p123456  db1 > db1.sql (备份db1数据库并保存为db1.sql文件)


安装mysql过程中,出现过的报错

1、丢失MSVCP140.DLL
解决方法:安装VC++2015运行库

2、安装VC++2015运行库失败
解决方法:控制面板-》Windows更新,更新到最新补丁

mysql8.0绿色版安装及mysqldump备份的更多相关文章

  1. mysql-8.0解压缩版安装配置完整过程

    https://www.cnblogs.com/xiongzaiqiren/p/8970203.html

  2. mysql-8.0.11-winx64 免安装版配置方法

    mysql-8.0.11-winx64.zip  下载地址:https://dev.mysql.com/downloads/file/?id=476233 mysql-8.0.11-winx64.zi ...

  3. mysql8.0.15二进制安装

    mysql8.0.15二进制安装 今天有幸尝试安装了社区版本的mysql8.0.15,记录下来,供以后方便使用.特此感谢知数堂的叶老师,提供了配置文件的模板. # 第一部分:系统配置 # 1.安装系统 ...

  4. mysql8.0.16二进制安装

    mysql8.0.16二进制安装 环境简介操作系统:Centos 6.10 64位 目前版本:8.0.16 MySQL Community Server 二进制 安装目录:/data/mysql/my ...

  5. 硬盘图标修改器 V1.0 绿色版

    软件名称:硬盘图标修改器 V1.0 绿色版软件语言: 简体中文授权方式: 免费软件应用平台: Win7 / Vista / Win2003 / WinXP / Win2008 软件大小: 12.3MB ...

  6. mysql-5.7.10-winx64 绿色版安装办法

    mysql-5.7.10-winx64 绿色版安装办法 为了防止安装程序造成电脑系统冗余,经过测试,终于将绿色版的mysql for windows安装成功.当然很多是从事百度搜索到的,但作为一种积累 ...

  7. MySQL5.6绿色版安装

    1.下载 MySQL绿色版安装需下载好三个文件 (1).MySQL5.6版本离线安装包 (2).Microsoft Visual C++ (3).Microsoft .NET Framework 1. ...

  8. 微信小程序(原名微信应用号)开发工具0.9版安装教程

    微信小程序全称微信公众平台·小程序,原名微信公众平台·应用号(简称微信应用号) 声明 微信小程序开发工具类似于一个轻量级的IDE集成开发环境,目前仅开放给了少部分受微信官方邀请的人士(据说仅200个名 ...

  9. 2016032201 - mysql5.7.10绿色版安装

    参考地址:http://jingyan.baidu.com/article/ff42efa93580c4c19e2202b6.html 其实您完全可以参考上面的百度贴吧内容搞定的,我记录只是做个笔记, ...

随机推荐

  1. Git:九、删除项目

    1.删除远程仓库 1)打开有绿色客隆按钮的仓库代码页面,选择Settings 2)把页面拉到最下边 2.删除本地仓库 1)先删.git隐藏文件 2)强行删除仓库文件夹 显示所有文件,包括隐藏的:ls ...

  2. Windows Server 2016-OU组织单位日常操作

    技术无所谓贵贱,既然曾经做过就总该是要留下点什么,毕竟做技术这些年给我们留下太多太多的成长经历,总有人问这些已经很皮毛了为什么还要写,其实没那么多花哨理由,就是想着做或者不做这一块总是要对过往做个简单 ...

  3. Takeown、Cacls、Icacls-文件、文件夹夺权用法

    常用示例如下: takeown   /f 文件名 获取该文件的所属权 takeown /f /r /d n 文件夹 获取整个文件夹及其下面子目录文件的所属权 takeown /f * /a /r /d ...

  4. python3 进一步了解装饰器 NLP第四条

    还是先来抄一段NLP第四条: 四,只有感官经验塑造出来的世界,没有绝对的真实世界   每个人运用自己的感觉器官把资料摄入(摄入过程),由于感官运用是主观地有选择性的,因此不能,亦不需要把所有资料捕获. ...

  5. 判断JS数据类型的四种方法

    在 ECMAScript 规范中,共定义了 7 种数据类型,分为 基本类型 和 引用类型 两大类,如下所示: 基本类型:String.Number.Boolean.Symbol.Undefined.N ...

  6. 从0到1打造自己的VOIP网络电话系统(基于FreePBX)

    从0到1打造自己的网络电话系统 最近流量卡越来越便宜了,看看自己手里的"坑不死老用户"的联通卡,顿时感觉到深深的恶意,但是iPhone没有双卡功能,所以只好自己动手打造一个网络电话 ...

  7. shell打印 倒等腰三角形

    #!/bin/bash read -p "input the length: " n方法一:内循环中的一个for循环shell写法for i in `seq 1 $n`do    ...

  8. Android开发:Android Studio开发环境配置

    一.android studio下载: 1.Windows版: 下载地址:https://pan.baidu.com/s/1-sg4dN_2B5nn2YJf-C7XLQ 提取码:yedc 2.Mac版 ...

  9. PreferencesUtils【SharedPreferences操作工具类】

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 可以替代ACache用来保存用户名.密码. 相较于Acache,不存在使用猎豹清理大师进行垃圾清理的时候把缓存的数据清理掉的问题. ...

  10. js实现二分查找算法

    二分查找:是一种搜索某个值的索引的算法. 基本条件:有序的数组. 思路:1.将数组折半,分成左右两个数组. 2.判断要查找的数和中间位置数值的大小,来判断要查找的数实在哪一半. 3.之后继续折半查找, ...