Windows mysql-8.0.11 master-slave 叢集(一)
一、下載安裝 mysql-8.0.11-winx64.zip:
(2)安裝目錄:D:\Servers\mysql-8.0.11-3306
(3)資料目錄:D:\Servers\mysql-8.0.11-3306\data
(4)配置:D:\Servers\mysql-8.0.11-3306\my.ini
[client]
port = 3306
default-character-set = utf8
[mysqld]
port = 3306
character_set_server = utf8
basedir = D:\Servers\mysql-8.0.11-3306
datadir = D:\Servers\mysql-8.0.11-3306\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
## skip-grant-tables
(5)初始化
D:\Servers\mysql-8.0.11-3306\bin>mysqld --initializeD:\Servers\mysql-8.0.11-3306\bin>mysqld install mysql3306
Service successfully installed.
D:\Servers\mysql-8.0.11-3306\bin>net start mysql3306
mysql3306 服務正在啟動 ..
mysql3306 服務已經啟動成功。
(6)查詢初始密碼 D:\Servers\mysql-8.0.11-3306\data\xxxxxxxxx.err
2018-06-07T05:11:17.447259Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-06-07T05:11:17.447403Z 0 [System] [MY-013169] [Server] D:\Servers\mysql-8.0.11-3306\bin\mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 17092
2018-06-07T05:11:23.095862Z 5 [Note] [MY-010454] [Server] A temporary password is generated for
2018-06-07T05:11:26.582370Z 0 [System] [MY-013170] [Server] D:\Servers\mysql-8.0.11-3306\bin\mysqld.exe (mysqld 8.0.11) initializing of server has completed
2018-06-07T05:12:56.687215Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-06-07T05:12:56.687330Z 0 [System] [MY-010116] [Server] D:\Servers\mysql-8.0.11-3306\bin\mysqld (mysqld 8.0.11) starting as process 15880
2018-06-07T05:12:58.554830Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-06-07T05:12:58.619985Z 0 [System] [MY-010931] [Server] D:\Servers\mysql-8.0.11-3306\bin\mysqld: ready for connections. Version: '8.0.11' socket: '' port: 3306 MySQL Community Server - GPL.
D:\Servers\mysql-8.0.11-3306\bin>mysql -uroot -P 3306 -p,8P:cZgV;MT1
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.11
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
(7)登入
mysql> set password=password('root');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'password('root')' at line 1
mysql> set password='root';
Query OK, 0 rows affected (0.09 sec)
mysql> exit
Bye
(8)設定遠端登入及
D:\Servers\mysql-8.0.11-3306\bin>mysql -uroot -P 3306 -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mysql;
Database changed
mysql> update user set host='%' where user='root';
Query OK, 1 row affected (0.12 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> quit;
Bye
使用navicat連線時出問題
D:\Servers\mysql-8.0.11-3306\bin>mysql -uroot -P3306 -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ALTER USER 'root'@'%' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.12 sec)
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
Query OK, 0 rows affected (0.03 sec)
(9)使用同樣的方式安裝 埠3307 3308上mysql
二、Slave Master叢集
master: mysql3306
slave: mysql3307, mysql3308
[client]
port = 3306
default-character-set = utf8
[mysqld]
port = 3306
character_set_server = utf8
basedir = D:\Servers\mysql-8.0.11-3306
datadir = D:\Servers\mysql-8.0.11-3306\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
## skip-grant-tables
[client]
port = 3306
default-character-set = utf8
[mysqld]
port = 3306
character_set_server = utf8
basedir = D:\Servers\mysql-8.0.11-3306
datadir = D:\Servers\mysql-8.0.11-3306\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
## skip-grant-tables
## master 配置
log-bin = mysql-bin ## 開啟二進位制日誌
server-id = 1 ## 定義一個id
binlog-do-db = test ## 資料庫
binlog-ignore-db = mysql ##
D:\Servers\mysql-8.0.11-3306\bin>mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE USER 'repuser'@'localhost' IDENTIFIED BY 'root';
Query OK, 0 rows affected (0.02 sec)
myswql
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repuser'@'localhost';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges
-> ;
Query OK, 0 rows affected (0.02 sec)
mysql> show master status
-> ;
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000004 | 155 | test | mysql | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
[client]
port = 3307
default-character-set = utf8
[mysqld]
port = 3307
character_set_server = utf8
basedir = D:\Servers\mysql-8.0.11-3307
datadir = D:\Servers\mysql-8.0.11-3307\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
## skip-grant-tables
## Slave 配置
server-id = 2 ## 定義一個id
D:\Servers\mysql-8.0.11-3306\bin>mysql -uroot -P3307 -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> CHANGE MASTER TO
-> MASTER_HOST='localhost',
-> MASTER_USER='repuser',
-> MASTER_PASSWORD='root',
-> MASTER_LOG_FILE='mysql-bin.000004',
-> MASTER_LOG_POS=155;
Query OK, 0 rows affected, 1 warning (0.23 sec)
相關推薦
Windows mysql-8.0.11 master-slave 叢集(一)
一、下載安裝 mysql-8.0.11-winx64.zip:(2)安裝目錄:D:\Servers\mysql-8.0.11-3306(3)資料目錄:D:\Servers\mysql-8.0.11-3306\data(4)配置:D:\Servers\mysql-8.0.11
Windows系統下安裝MySQL 8.0.11數據庫
初始化 密碼修改 之前 ima In cal char http IE MySQL數據庫是常用的數據庫之一,而且該數據庫開源免費,所以很多公司在使用。本文記錄如何在Windows系統下安裝MySQL數據庫,本次安裝的版本號為8.0.11,這個版本是當前的最新版本,據宣傳,8
Windows環境下安裝 mysql-8.0.11-winx64 遇到的問題解決辦法
下載mysql安裝包,我的是下載mysql-8.0.11-winx64,解壓到你想安裝的目錄下,然後配置環境(window環境下,mac本還沒試過), 1、首先,配置環境:右擊此電腦->屬性->高階系統設定->環境變數->path->新建 ,然後將自己的路徑新增進去(例如我目錄:
mysql 8.0.11 安裝(windows)
mysql本地安裝(windows) 一、安裝包下載 從官網下載安裝包,地址:https://dev.mysql.com/downloads/mysql/ 二、配置 解壓到本地,然後在目錄下新建my.ini檔案,如下: my.ini中內容如下: [mysql] # 設定my
MySQL 8.0.11安裝教程(Windows版)
首先下載MySQL,下載地址:https://dev.mysql.com/downloads/mysql 下載完成後,解壓到想要安裝的目錄下,例如:E:\mysql\mysql-8.0.11-winx64 接下來開啟剛剛解壓的資料夾E:\mysql\mysql-8
windows 64位 mysql-8.0.11-winx64 安裝
這是我電腦的環境:8GB記憶體,64位系統1.下載mysql-8.0.11-winx642.我解壓的路徑是:G:\java tools\mysql-5.7.22-winx64\mysql-5.7.22-winx64我自己安裝的是mysql5.7.22版本:1.以管理員身份開啟
windows下mysql-8.0.11-winx64.zip安裝教程詳解
到官網直接下ZIP包:https://dev.mysql.com/downloads/1、解壓ZIP到一個目錄,比如“d:\mysql-8.0.11-winx64"。2、配設my.ini檔案:我們發現解壓後的根目錄下沒有這個檔案,那我們可以自行建立。my.ini基本配置:[m
Windows下安裝MySQL-8.0.11
解壓下載檔案到安裝目錄 (當前 D:\mysql-8.0.11) 建立my.ini檔案,(當前放置於D:\mysql-8.0.11目錄下) [mysql] #設定mysql客戶端預設字符集 default-character-set=utf8mb4 [mysql
MYSQL-8.0.11-WINX64(免安裝版)配置
OS value auth IE alter ransac 不支持 caching 安裝服務 1. 解壓zip包到安裝目錄 首先,將mysql-8.0.11-winx64.zip 解壓縮到 安裝D:/mysql-8.0.11-winx64 目錄下, 2.配置文件 在安裝根目
MySql 8.0.11 在win10下的zip非安裝配置
cmd blank sans 位置 路徑 密碼 IT alt mysql 在win10使用mysql8.0.11的zip包進行配置時,搜到的教程很多坑,特此總結成功配置的方法。 1、下載非安裝的zip包 mysql 8.0.11 64位 2、解壓zi
mysql-8.0.11-winx64下載
地址 blank 6.2 install dev 直接 下載 教程 inf 地址http://dev.mysql.com/downloads/ 這裏點擊:DOWNLOAD 鏈接,進入一下頁面: 這裏點擊:DOWNLOAD 鏈接,進入一下頁面: 這裏要求註
mysql-8.0.11-winx64配置
AS word class mysql的安裝 storage ted 打印 err csharp 1、首先下載mysql-8.0.11-winx64.zip,並解壓到自定義目錄。 我的安裝目錄為F:\software\eclipse J2EE\mysql-8.0.11-wi
win10安裝mysql 8.0.11
star requested sel solid 自動創建 數據庫 its bubuko not mysql安裝包可到官網下載,地址:https://dev.mysql.com/downloads/mysql 1、首先解壓文件包,我這解壓到E:\install_work\
MYSQL-mysql 8.0.11安裝教程
下載 重新 初始 效果 mysql err ive nat target 環境準備 mysql-8.0.11-winx64.zip下載地址:https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.11-winx64.
win7 / mysql-8.0.11-winx64 安裝的測坑步驟
... premium port 差異 管理 toc mysql.h rac respond 虛驚一場,主要問題是 Navicat Premium 連接 mysql8 Client does not support authentication 。 1. 下載 官網下載
MySQL8安裝:mysql-8.0.11-winx64
嘗試 mysql安裝 ini ror stop client port 過程 max 安裝過程: 初始化: 解壓安裝包之後,在根目錄創建文件:my.ini my.ini [mysqld] # 設置3306端口 port=3306 # 設置mysql的安裝目錄
CentOS 7.2 下 mysql 8.0.11二進制安裝(親測)
type server png not tex 分享 chown sed tar 本文主要介紹mysql 8.0.11二進制安裝,具體步驟如下1. 解壓文件tar -zxvf mysql-8.0.11-el7-x86_64.tar.gz2. 移動解壓後的數據庫文件mv my
mysql 8.0.11 innodb cluster 高可用集群手冊系列之一 ------集群介紹
png nag tex 介紹 畫的 innodb process http term MySQL 8.0.11 innodb cluster 高可用集群部署運維管理手冊 一 innodb cluster 原理介紹 作者 方連超 Innodb cluster 原理介
MySQL 8.0.11 innodb cluster 運維管理手冊之三增加節點
全量備份 size images 主機 配置文件 如果 tex 頻繁 切換 MySQL 8.0.11 innodb cluster 運維管理手冊之三 增加節點 作者 方連超 假設innodb cluster集群跑了1年,突然某個節點掛掉了,這個時候,日誌也已經沒有binl
MySQL 8.0.11 innodb cluster 運維管理手冊之二--集群搭建
ODB ant security 支持 hostname limit trie not wall MySQL 8.0.11 innodb cluster 高可用集群部署運維管理手冊之二 集群建設 作者 方連超 基礎環境 系統:centos 7.5Mysql:8.0.11