目錄[-]
- 1.? 1. 下載
- 2.? 2. 安裝
參考文檔:MySQL :: MySQL 8.4 Reference Manual
1. 下載
???mysql官網下載msi安裝程序:MySQL :: Begin Your Download
2. 安裝
???運行下載的mis程序,逐步安裝。
- 安裝模式:?complete;
- 進入配置:
- data directory:?mysql所有進行管理的物理數據存儲路徑,自行定義。
-
Type and Networking -Server Configuration Type:?不同的服務器配置模式對主機內存占用不同,本文使用development,針對個人電腦(typically this is your personal workstation).
-
Type and Networking -Connectivity:?定義如何連接到此MYSQL服務端。協議跟端口及windows端口防火墻均默認即可。named pipe參數用來授權用戶訪問級別,推薦Minimum access to all users (RECOMMENDED),Shared Memory參數用來定義共享內存連接,在同一臺主機上定義多個mysql實例時有用。此參數區分大小寫。
-
高級配置不勾選show advanced選項,太麻煩遼
-
賬戶角色:?記錄root用戶密碼。其他用戶有必要的話新增即可
- 服務運行模式:?默認以windows服務模式自動運行,由windows服務統一管理。或者以mysql服務程序方式手動運行。此處我們默認windows統一管理運行。運行用戶默認,保證權限。
- 服務文件權限:?默認第一項服務運行用戶及管理員組。
- 演示數據庫:?建不建無所謂。
- 應用配置并等待完成即可:
應用配置時可能會報如下失敗:
進入windows服務管理,將mysql84服務的登錄屬性調整為本地系統賬戶即可:
配置日志如下:
Beginning configuration step: Writing configuration fileSaving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration fileBeginning configuration step: Updating Windows Firewall rulesAttempting to delete a Windows Firewall rule with command: netsh.exe advfirewall firewall delete rule name="Port 3306" protocol=TCP localport=3306已刪除 1 規則。
確定。Adding a Windows Firewall rule for MySQL84 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
確定。Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL84 on port 33060.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow
確定。Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rulesBeginning configuration step: Adjusting Windows serviceAttempting to grant the required filesystem permissions to the 'NT AUTHORITY\NetworkService' account.
Granted permissions to the data directory.
Granted permissions to the install directory.
Adding new service
New service added
Ended configuration step: Adjusting Windows serviceBeginning configuration step: Starting the serverAttempting to start service MySQL84...
MySQL Server - start.
C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe (mysqld 8.4.0) starting as process 33368
InnoDB initialization has started.
InnoDB initialization has ended.
CA certificate ca.pem is self signed.
Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe: ready for connections. Version: '8.4.0' socket: '' port: 3306 MySQL Community Server - GPL.
X Plugin ready for connections. Bind-address: '::' port: 33060
Successfully started service MySQL84.
Waiting until a connection to MySQL Server 8.4.0 can be established (with a maximum of 10 attempts)...
Retry 1: Attempting to connect to Mysql@localhost:3306 with user root with no password...
Successfully connected to MySQL Server 8.4.0.
Ended configuration step: Starting the serverBeginning configuration step: Updating the Start menu linkAttempting to verify command-line client shortcut.
Verified command-line client shortcut.
Verified command-line client shortcut.
Ended configuration step: Updating the Start menu linkBeginning configuration step: Updating example databasesUpdating example databases...
Ended configuration step: Updating example databases