Mysql5.7 ZIP 压缩包非安装版的安装方式
生活随笔
收集整理的這篇文章主要介紹了
Mysql5.7 ZIP 压缩包非安装版的安装方式
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
MYSQL 壓縮包的安裝方式大致分為以下幾個步驟,這里以 5.7.11 為例:
下載 MYSQL ZIP 包:http://downloads.mysql.com/archives/get/file/mysql-5.7.10-winx64.zip
解壓到指定的安裝目錄
如 D:\Env\MySQL\mysql-5.7.11-winx64
創建配置文件,因為這里使用的是 WINDOWS 版本,這里復制 my-default.ini 為 my.ini 即可
[mysqld] # set basedir to your installation path basedir=D:/Env/MySQL/mysql-5.7.11-winx64/ # set datadir to the location of your data directory datadir=D:/Data/mysql-5.7.11-winx64/Data選擇 mysql 類型
The following table shows the available servers for Windows in MySQL 5.7.
| mysqld | Optimized binary with named-pipe support |
| mysqld-debug | Like mysqld, but compiled with full debugging and automatic memory allocation checking |
這里自然選用 mysqld
初始化 Mysql
由于 mysql5.7 zip 包中并不包含 data 目錄,因此需要先進行初始化,參照 http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
具體命令為:
mysqld --initialize-insecure --explicit_defaults_for_timestamp // 安裝 mysql 服務,因為這里我的服務器上還有老版本的在用,所以重新安裝一個新的MYSQL服務 mysqld --install MySQL3307啟動 mysql
net start mysqlSecure the default user accounts
有可能會遇到的問題
- 問題一
解決方案:在 [mysqld] 節點下增加 tmpdir 目錄
basedir=D:/Env/MySQL/mysql-5.7.11-winx64/ datadir=D:/Data/mysql-5.7.11-winx64/Data tmpdir = D:/tmp- 問題二
提示 NO_ZERO
解決方案:修改 sql-mode
總結
以上是生活随笔為你收集整理的Mysql5.7 ZIP 压缩包非安装版的安装方式的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java 基于 UDP 实现 Socke
- 下一篇: Udemy - Build Apps w