這是歷史版本頁面 — 看 MySQL (32-bit) 最新版本

裝了 MySQL 之後不知道怎麼開始?它能做什麼、該不該用

MySQL (32-bit) 軟體圖示 MySQL (32-bit) 5.6.35 (32-bit) 資料更新 2016-12-15 閱讀約 6 分鐘

你剛把 MySQL 裝好,打開黑色的命令提示字元視窗,輸入指令後卻不確定下一步要做什麼。或者你正在架一個網站、寫一支小程式,需要一個地方存放資料,聽別人說「用 MySQL 就好」,但你真的打開它之後,才發現跟想像中完全不一樣——沒有漂亮的視窗介面,只有一行一行的文字指令,你甚至不知道該從哪個指令開始。

一般人遇到這種狀況,直覺是去裝一個圖形介面工具,或是上網找教學影片。但問題往往不是「不會操作」,而是「不確定 MySQL 到底能幫你做到什麼程度」。它不像一般應用程式打開就能用,它是一套資料庫伺服器,需要你先理解「資料庫」的概念,才知道怎麼讓它為你工作。這類工具的核心切入點,是讓你把資料有結構地存起來、隨時查得回來,而不是像 Excel 那樣手動管理。

01MySQL 到底是做什麼用的?

它是一套關聯式資料庫管理系統,用來存放、管理、查詢資料。你可以把它想成一個「有結構的倉庫」——先把資料依照表格、欄位、關聯的方式規劃好,之後用 SQL 指令把資料寫進去或讀出來。網站會員資料、訂單紀錄、文章內容,這類需要頻繁讀寫的資料,都適合交給它處理。

02這套軟體一定要用指令操作嗎?

它本身主要透過命令提示字元操作,沒有內建圖形介面。但官方文件提到,可以搭配 phpMyAdmin、MySQL Workbench、Navicat 這些第三方工具,用滑鼠點一點就能建立表格、執行查詢、看效能狀態。如果你不習慣打指令,裝一個圖形工具會比較好上手。

03我原本用別的資料庫,可以把資料搬過來嗎?

官方說明指出,它提供工具和公用程式,可以從 Oracle、SQL Server、PostgreSQL 這些其他資料庫系統遷移過來。不過實際遷移的過程會牽涉到資料型別轉換、編碼設定等細節,建議先找官方文件確認支援的版本和步驟,再動手轉移。

04它支援寫入複雜的邏輯嗎?例如自動計算或觸發事件?

支援。官方文件明確列出它支援預存程序、觸發器和函數,意思是你可以把一段常用的 SQL 邏輯存起來重複呼叫,也可以在特定事件發生時自動執行某段程式。這對需要自動化處理資料的應用程式來說,是很常用的功能。

05資料放進去之後,要怎麼防止別人亂看?

它提供使用者認證、存取控制和加密機制。你可以建立不同的使用者帳號,分別設定他們能看哪些資料庫、能執行哪些操作,也可以啟用加密來保護傳輸中的資料。不過這些都需要你自己去設定,預設狀態下並不會自動幫你做好完整的權限控管。

06我完全沒寫過程式,適合用這套軟體嗎?

官方文件提到,要有效使用 MySQL,需要具備 SQL 語言的基本概念。如果你完全沒有接觸過資料庫,直接從指令開始會比較吃力。建議先學一點 SQL 語法,或從圖形介面工具開始操作,理解「表格、欄位、查詢」這些基本概念之後,再回來用指令會順很多。

07我只是做一個簡單的小專案,用這套會不會太重?

官方說明指出,它適合從小型應用到大規模企業系統。但如果你只是要存少量資料、不想管伺服器設定,官方文件也提到 SQLite 這類「免伺服器」的資料庫,特色是簡單、可攜、零設定。如果你的專案不需要多人同時連線、不需要複雜查詢,SQLite 可能更省事。

08這套軟體是免費的嗎?有沒有什麼限制?

它分為 Community Edition(免費、開放原始碼)和 Enterprise Edition(付費訂閱)。免費版功能已經很完整,但官方文件提到,進階功能像是即時分析、企業級技術支援,只有在付費的 Enterprise Edition 才有。如果你需要的是基本儲存和查詢,免費版通常夠用。

09我習慣用圖形介面,這套軟體有中文介面嗎?

它的介面語言是英文,而且主要操作介面是命令列。官方文件提到的第三方工具,像是 phpMyAdmin、MySQL Workbench,是否有中文介面需要另外確認。如果你很依賴中文介面,可能要考慮其他有提供在地化語言的資料庫工具,或先試用看看英文介面能不能接受。

10這套軟體在 Windows 上跑得順嗎?

官方說明指出,它支援 Windows、macOS 和 Linux,安裝過程通常是執行安裝程式、按幾個下一步。但官方文件也提醒,系統需求會依作業系統和版本而異,需要足夠的磁碟空間、記憶體和處理器效能。如果你的電腦規格比較舊,建議先確認官方列出的需求再安裝。

11我聽說 MySQL 很容易被駭,是真的嗎?

官方文件強調它提供多種驗證機制和加密選項來保護資料,但安全性很大程度取決於你怎麼設定。預設安裝完成後,如果你沒有修改預設帳號密碼、沒有設定防火牆規則,確實會有風險。建議安裝後第一件事就是設定強密碼、建立專用帳號,並關閉不需要的網路連線。

12這套軟體和 SQL Server Express 比起來,哪個比較適合我?

兩者都是免費的資料庫,但取向不同。SQL Server Express 是微軟的產品,和 Windows 環境、微軟開發工具整合較好;MySQL 則強調跨平台、支援多種程式語言。官方文件也提到,SQL Server 是 MySQL 的替代方案之一。如果你主要用微軟生態系,SQL Server Express 可能比較順;如果你需要跨平台或搭配開源技術,MySQL 會是常見選擇。

下載與官方連結

前往官方網站 下載 MySQL (32-bit)

mysql-5.6.35-win32.msi · 35.13 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

MySQL Enterprise Notes:
- Enterprise Encryption for MySQL Enterprise Edition now enables server administrators to impose limits on maximum key length by setting environment variables. These can be used to prevent clients from using excessive CPU resources by passing very long key lengths to key-generation operations. For more information, see Enterprise Encryption Usage and Examples

Security Notes:
Incompatible Change: These changes were made to mysqld_safe:
- Unsafe use of rm and chown in mysqld_safe could result in privilege escalation. chown now can be used only when the target directory is /var/log. An incompatible change is that if the directory for the Unix socket file is missing, it is no longer created; instead, an error occurs. Due to these changes, /bin/bash is required to run mysqld_safe on Solaris. /bin/sh is still used on other Unix/Linux platforms
- The --ledir option now is accepted only on the command line, not in option files
- mysqld_safe ignores the current working directory

Other related changes:
- Initialization scripts that invoke mysqld_safe pass --basedir explicitly
- Initialization scripts create the error log file only if the base directory is /var/log or /var/lib
- Unused systemd files for SLES were removed
- MySQL Server now includes a plugin library that enables administrators to introduce an increasing delay in server response to clients after a certain number of consecutive failed connection attempts. This capability provides a deterrent that slows down brute force attacks that attempt to access MySQL user accounts. For more information, see The Connection-Control Plugin
- OpenSSL is ending support for version 1.0.1 in December 2016; Consequently, MySQL Commercial Server builds now use version 1.0.2 rather than version 1.0.1, and the linked OpenSSL library for the MySQL Commercial Server has been updated from version 1.0.1 to version 1.0.2j. For a description of issues fixed in this version, This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead

Functionality Added or Changed:
- InnoDB: By default, InnoDB reads uncommitted data when calculating statistics. In the case of an uncommitted transaction that deletes rows from a table, InnoDB excludes records that are delete-marked when calculating row estimates and index statistics, which can lead to non-optimal execution plans for other transactions that are operating on the table concurrently using a transaction isolation level other than READ UNCOMMITTED. To avoid this scenario, a new configuration option, innodb_stats_include_delete_marked, can be enabled to ensure that InnoDB includes delete-marked records when calculating persistent optimizer statistics
- Unit testing now uses Google Mock 1.8

Bugs Fixed:
- Incompatible Change: A change made in MySQL 5.6.32 for handling of multibyte character sets by LOAD DATA was reverted due to the replication incompatibility
- InnoDB: The GCC mach_parse_compressed function should load one to five bytes depending on the value of the first byte. Due to a GCC bug, GCC 5 and 6 emit code to load four bytes before the first byte value is checked . A workaround prevents this behavior
- InnoDB: Due to a glibc bug, short-lived detached threads could exit before the caller had returned from pthread_create(), causing a server exit
- InnoDB: An error during a table-rebuilding operation on a table with only a generated clustered index (GEN_CLUST_INDEX) raised and assertion due to an error called with an invalid key name
- InnoDB: On a table without an explicitly defined primary key, InnoDB did not replace the implicit clustered index (GEN_CLUST_INDEX) when a unique key was defined on a NOT NULL column
- InnoDB: InnoDB failed to free memory used by the full-text optimizer thread
- InnoDB: SHOW ENGINE INNODB STATUS output showed a “cleaning up” state for an idle thread. Thread state information was not reset after statement execution
- InnoDB: After a server restart, concurrent INSERT operations a table with an auto-increment primary key resulted in a duplicate entry error. The current auto-increment value was not changed after auto_increment_increment and auto_increment_offset settings were modified
- Replication: Tables with special DEFAULT columns, such as DEFAULT CURRENT_TIMESTAMP, that existed only on a slave were not being updated when using row-based replication (binlog_format=ROW)
- Replication: Enabling semisynchronous replication when a server was during the commit stage could cause the master to stop unexpectedly
- Replication: The fix for Bug #81657 was correctly merged into MySQL 5.6
- Some Linux startup scripts did not process the datadir setting correctly
- CREATE TABLE with a DATA DIRECTORY clause could be used to gain extra privileges
- OEL RPM packages now better detect which platforms have multilib support (for which 32-bit and 64-bit libraries can be installed). Thanks to Alexey Kopytov for the patch
- Compiling MySQL using Microsoft Visual Studio 2015 Version 14.0.25420.1 in relwithdebinfo mode failed with linking errors
- Warnings occurring during CREATE TABLE ... SELECT could cause a server exit
- For segmentation faults on FreeBSD, the server did not generate a stack trace
- The .mylogin.cnf option file is intended for use by client programs, but the server was reading it as well. The server no longer reads it
- If mysqladmin shutdown encountered an error determining the server process ID file, it displayed an error message that did not clearly indicate the error was nonfatal. It now indicates that execution continues
- The data structure used for ZEROFILL columns could experience memory corruption, leading eventually to a server exit
- Use of very long subpartition names could result in a server exit. Now partition or subpartition names larger than 64 characters produce an ER_TOO_LONG_IDENT error
- On Solaris, gettimeofday() could return an invalid value and cause a server shutdown
- A union query resulting in tuples larger than max_join_size could result in a server exit
- The optimizer could choose ref access on a secondary index rather than range access on the primary key, even when the cost was higher
- For some deeply nested expressions, the optimizer failed to detect stack overflow, resulting in a server exit
- When taking the server offline, a race condition within the Performance Schema could lead to a server exit
- The Performance Schema events_statements_summary_by_digest table could contain multiple rows for the same statement digest and schema combination, rather than the expected single (unique) row
- For debug builds: Adding a unique index to a POINT NOT NULL column triggered a warning and the key was not promoted to a primary key. Creating a unique index on a different non-NULL column in the same table then raised an assertion
- Compiling using Clang 3.5 or higher with AddressSanitizer (ASAN) enabled caused the gen_lex_hash utility to abort on Clang LeakSanitizer memory leak check failures
- Miscalculation of memory requirements for qsort operations could result in stack overflow errors in situations with a large number of concurrent server connections