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

想學資料庫先裝哪套?MySQL 能幫你做到什麼

MySQL (64-bit) 軟體圖示 MySQL (64-bit) 5.7.14 (64-bit) 資料更新 2016-07-30 閱讀約 6 分鐘

你正在架一個網站、寫一支會存資料的程式,或學校作業要用到資料庫。你上網查「資料庫 軟體」,跑出一堆名字,每個看起來都很專業,但你其實只想知道:裝哪一套可以趕快把資料存進去、把資料撈出來,不要卡在安裝和設定。你怕選錯,更怕裝了之後才發現不適合,又要重來。

很多人第一個念頭是用 Excel 或 Google 試算表硬撐,但資料一多、要同時讓好幾個人查詢、要寫條件篩選的時候,試算表就開始卡。另一條路是直接租雲端資料庫,但每個月要付錢,對還在學習或開發階段的人來說負擔太大。這類資料庫軟體的切入點是:給你一套在本機就能跑的關聯式資料庫,用 SQL 指令跟它溝通,先解決「有地方存資料」這個根本問題。

01MySQL 到底是做什麼用的?

它是一套關聯式資料庫管理系統,用來儲存、管理、查詢資料。你可以把它想成一個放在電腦裡的資料倉庫,透過 SQL 指令建立資料表、寫入資料、下條件查詢。它本身沒有圖形介面,安裝完之後是背景服務,要另外裝管理工具才能看到資料內容。

02我完全沒碰過資料庫,這套軟體適合入門嗎?

適合,但要有心理準備。它主要透過命令列操作,你至少要會基本的 SQL 語法,例如 CREATE TABLE、SELECT、INSERT 這些指令。官方文件寫得很完整,網路上教學資源也很多,只是學習曲線比圖形介面的工具陡一些。如果你完全不想碰指令,可以搭配 MySQL Workbench 這類圖形工具使用。

03它跟 Excel 有什麼差?什麼時候該換成資料庫?

Excel 適合幾千筆以內、單人編輯、不需要複雜關聯的資料。當資料量變大、多人同時讀寫、或你要做跨表格查詢的時候,Excel 會明顯變慢且容易出錯。MySQL 用 SQL 處理查詢,效能穩定,也支援多人同時連線,適合網站、應用程式這類需要頻繁讀寫資料的場景。

04安裝過程會不會很複雜?

安裝本身不複雜,執行安裝檔、按幾個下一步就裝好了。比較需要花時間的是安裝後的設定,包括資料庫帳號密碼、存取權限、連線埠這些。官方文件有提到,安裝時可以設定資料庫選項、定義存取權限、指定儲存方式。如果你只是想先跑起來,用預設值就可以了。

05它有沒有圖形介面可以用?

軟體本身只有命令列介面,但官方文件列出了幾個第三方圖形工具,包括 phpMyAdmin、MySQL Workbench、Navicat。這些工具可以讓你用滑鼠建立資料表、執行查詢、看效能狀態,不用背指令。其中 MySQL Workbench 是 Oracle 出的免費工具,跟 MySQL 搭配使用的人很多。

06我寫程式的語言跟它合得來嗎?

官方文件說它支援多種程式語言,並提供對應的連接器,例如 Java 用 MySQL Connector/J、Python 用 MySQL Connector/Python。也就是說,你只要照官方文件把對應的驅動程式裝好,就可以從程式裡連到資料庫下 SQL 指令。PHP、C# 這些常見語言也都有社群提供的連線方式。

07這套軟體是免費的嗎?

它分成兩個版本:Community Edition 免費且開放原始碼,Enterprise Edition 要訂閱付費。免費版涵蓋大部分日常功能,但官方文件提到,即時分析、企業級技術支援這類進階功能只有在付費版才有。一般學習、開發、小型專案用免費版就夠了。

08我只會 Windows,這套軟體在我的電腦上跑得起來嗎?

可以。官方支援 Windows 7 到 Windows 11 的 64 位元系統,也支援 macOS 和 Linux。安裝時要注意你的系統是 64 位元,硬碟空間和記憶體要看資料庫大小決定,官方文件說需求會依版本和資料量而不同。

09介面是中文的嗎?

不是。軟體本身的介面是英文,安裝過程和命令列操作都是英文。如果你對英文介面不熟悉,操作上會多一層障礙。不過圖形工具 MySQL Workbench 的介面也是英文,這點要先有心理準備。網路上有大量中文教學,可以邊看邊學。

10我只是想存一些個人資料,這套會不會太重?

如果你的需求是單機、單人、資料量不大,SQLite 這類輕量資料庫可能更適合。SQLite 不需要安裝伺服器、不需要設定帳號密碼,把資料庫存成一個檔案就能用。MySQL 需要背景服務持續執行,對純個人用途來說確實比較重,但如果你之後要學網站開發,遲早會用到它。

11我聽說微軟也有免費的 SQL Server Express,跟它比起來呢?

SQL Server Express 是微軟出的免費資料庫,介面是中文的,圖形工具 SSMS 也比較完整,對 Windows 使用者來說上手門檻較低。MySQL 的優勢是跨平台、開源、社群龐大,而且網路上教學資源非常多。兩套都是免費的,你可以先裝 MySQL 試試,不習慣再換 SQL Server Express。

12這套軟體是不是很久沒更新了?

不是。根據收錄的版本紀錄,它從 2011 年至今持續有新版釋出,最近一年內更新了 3 次,最近兩年內更新了 7 次,屬於持續維護中的軟體。開發商是 Oracle,背後有商業公司在維護,不用擔心專案突然停擺。

下載與官方連結

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

mysql-5.7.14-winx64.msi · 95.2 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

SYS SCHEMA NOTES:
- The sys schema now has a quote_identifier() function that, given a string argument, produces a quoted identifier suitable for inclusion in SQL statements. (Bug #22011361, Bug #78823)
- Output from the sys schema diagnostics() procedure now includes the Tls_version column from the mysql.slave_master_info system table.

FUNCTIONALITY ADDED OR CHANGED:
- The %global compatver value for RPM packages for RHEL/OEL and Fedora releases was updated from 5.6.25 to 5.6.31. (Bug #23038018)
- Specifying an empty value for the --port option (for example, --port=, --port="") is now deprecated and results in a warning. An empty value will be an error in MySQL 8.0. (Bug #23023457, Bug #80903)
- CMake support for compiling with Solaris Studio 12.5 was added. (Bug #82249, Bug #24303829, Bug #81274, Bug #23212938)
- The INFORMATION_SCHEMA INNODB_LOCKS and INNODB_LOCK_WAITS tables are now deprecated and will be removed in a future MySQL release.

BUGS FIXED:
- Performance: A flaw in the allocation of memory for appending string values caused some operations to be performed slowly, including creation of tables having generated columns and inserts of large values into JSON columns. (Bug #80556, Bug #22843444)
- InnoDB: Full-text search auxiliary tables could be dropped by one session while being access by another. (Bug #23742339)
- InnoDB: Selecting full-text index information schema tables for a deleted table caused a segmentation fault. (Bug #23479595)
- InnoDB: A tablespace operation did not properly update the SYS_VIRTUAL system table. (Bug #23325659)
- InnoDB: Rollback of a full-text index synchronization operation raised an assertion. The rollback operation attempted to acquire a mutex still held by the background synchronization thread. (Bug #23320569)
- InnoDB: After compressing a table, an incorrect data length was passed to an internal tablespace encryption function, causing an assertion. (Bug #23279788)
- InnoDB: An r-tree page lock placed during a search operation prevented an undo operation within the same transaction from merging pages. (Bug #23241575)
- InnoDB: A bulk load insert of a record with a compressed size greater than half of the compressed page size resulted in infinite B-tree page splitting when compressing the uncompressed page. (Bug #23120933)
- InnoDB: A lock order violation related to InnoDB full-text search caused errors and raised an assertion. (Bug #23120005)
- InnoDB: In read-only mode, InnoDB attempted to set a corrupt bit in the SYS_INDEXES system table. In read-only mode, the corruption should only be marked in memory. (Bug #23077748)
- InnoDB: InnoDB attempted to materialize non-key generated virtual columns that were not required for partitioning. (Bug #23037025)
- InnoDB: An insert operation on a table containing virtual and spatial indexes raised an assertion due to an invalid parent path encountered during page splitting. (Bug #23008863)
- InnoDB: An ALTER TABLE operation on a table with an indexed virtual column raised an assertion. (Bug #22965271)
- InnoDB: Adding or dropping a generated virtual column could raise an assertion due to a table handle held by an active memcached connection. (Bug #22922527)
- InnoDB: A full-text query that involved a large number of records exceeded the result cache limit and caused a server exit. (Bug #22709692, Bug #80296)
- InnoDB: InnoDB did not block the creation of a foreign key constraint with referential actions on the base column of a generated stored column. (Bug #22687023, Bug #80304)
- InnoDB: The optimizer failed to mark the columns required for MATCH function evaluation when the secondary index used for the full-text query was not chosen by the optimizer. (Bug #22679209, Bug #80298)
- InnoDB: In READ COMMITTED isolation level, InnoDB unnecessarily acquired the lock_sys mutex at COMMIT for a transaction block consisting of read-only SELECT statements.
- InnoDB: Setting innodb_monitor_enable to all did not enable all counters. (Bug #22576241, Bug #80083)
- InnoDB: InnoDB now permits defining a foreign key constraint with a cascading referential action on the base column of an indexed virtual column, and defining cascading referential actions on non-virtual foreign key columns that are explicitly included in a virtual index. (Bug #22469130, Bug #79772)
- InnoDB: An assertion was raised during rollback of an ALTER TABLE operation that dropped and added a secondary index. (Bug #22005726)
- Partitioning: In some cases, an issue with partition pruning being attempted a second time during optimization after all partitions had already been pruned at parsing time led to an assert. (Bug #23194259)
- Replication: Replication slaves could exit trying to apply an UPDATE row event containing virtual generated columns received from a master that was set to binlog_row_image=minimal. (Bug #23604483)
- Replication: When using row-based replication and InnoDB, replication slaves reverted to using an older locking scheme when a transaction had already acquired an AUTOINC lock related to a LOAD FILE or INSERT ... SELECT type of statement, reducing replication slave performance. The fix ensures that sql_command is set correctly for any of the DML events such as WRITE_ROWS_EVENT, UPDATE_EVENT, and DELETE_EVENT. (Bug #79324, Bug #22247668)
- Replication: When using statement-based or mixed binary logging format with --read-only=ON, it was not possible to modify temporary tables. (Bug #62008, Bug #12818255)
- References: See also: Bug #14294223, Bug #16561483.
- MySQL Server upgrades performed using RPM packages failed when upgrading from MySQL 5.6 Community to MySQL 5.7 Community or MySQL 5.6 Commercial to MySQL 5.7 Commercial. (Bug #23736787)
- On CentOS, mysqld installed from a MySQL Community distribution failed to start if a my.cnf file with no datadir value specified was used. (Bug #23721277, Bug #82049)
- The -DWITH_EDITLINE=system CMake option failed with recent versions of the editline library. (Bug #23708332)
- Executing prepared statements with the audit_log plugin installed could cause a server exit. (Bug #23699991)
- The sys schema ps_trace_statement_digest() procedure failed for statements not supported by EXPLAIN, for statements for which EXPLAIN could not find tables, and for statements with no digest found during the monitored period. (Bug #23621189)
- A SELECT Performance Schema tables when an internal buffer was full could cause a server exit. (Bug #23550835, Bug #23298025, Bug #81464)
- The code for reading character set information from Performance Schema statement events tables (for example, events_statements_current) did not prevent simultaneous writing to that information. As a result, the SQL query text character set could be invalid, which could result in a server exit. Now an invalid character set causes SQL_TEXT column truncation. (Bug #23540008)
- An error message spelling error was corrected. Thanks to Derek Jones for the patch. (Bug #23525874, Bug #81713)
- In the Performance Schema, allocating a record when a buffer was full could lead to a server exit. (Bug #23515302)
- A buffer overflow in the regex library was fixed. (Bug #23498283)
- Upgrading from native MySQL 5.6 Debian/Ubuntu packages to Oracle-supplied MySQL 5.7 packages caused server restart failures. (Bug #23498230)
- The CMake configuration was too aggressive in making symbols invisible, resulting in link problems with GCC 5.3 on Solaris. (Bug #23344916, Bug #81593)
- Audit log filtering against the user was performing comparisons against USER(), not CURRENT_USER(). (Bug #23344762)
- After upgrading only the server using RPM packages, the server could fail to start, complaining about a bad errmsg.sys file. (Bug #23338603)
- Upgrading from native Ubuntu 5.7.12 packages to MySQL 5.7.13 packages failed with conflict messages. (Bug #23327563)
- For debug builds, the server exited abnormally if a shutdown command was issued while the audit_log plugin was loaded and an active connection existed. (Bug #23310864)
- The server could fail to interpret expired passwords as expired. (Bug #23291841)
- Certain arguments to NAME_CONST() could cause a server exit. (Bug #23279858)
- For unit-testing with the MySQL test suite, the make unit-test command is no longer available. The ctest program should be used instead. See Unit Tests Added to Main Test Runs. (Bug #23273434)
- Audit log plugins (including query rewrite plugins, which use the audit API) were being acquired and released per statement, negatively affecting scalability. To improve performance, these plugins now are acquired once and released only when the connection ends. (Bug #23236404, Bug #81298)
- mysql-test-run.pl now has a --manual-boot-gdb option that is similar to --boot-gdb but attaches the debugger to the server during the bootstrapping process, permitting the use of a remote debugger. (Bug #23090633)
- The -fexpensive-optimizations option to GCC caused ARM64 and PowerPC builds to compute floating-point operations slightly differently from other platforms. CMake now checks for this problem and disables the option as necessary. (Bug #23046775)
- The test_service_sql_api.test_session_general_log test case now cleans up the general_log table by truncating it at the end of the test. Thanks to Daniel Black for the patch. (Bug #23021111, Bug #80895)
- Lines written to the error log had no space separating the timestamp and thread ID columns if the thread ID took five or more characters. (Bug #23005009, Bug #80854)
- For the innodb_buffer_stats_by_schema and innodb_buffer_stats_by_table sys schema views, the pages_hashed and pages_old columns were incorrect. Thanks to Tsubasa Tanaka for the patch. (Bug #22988461, Bug #80833)
- An incorrect result could be returned for a query using a merged derived table or a view when compared to a similar query using a base table directly, if the query included a WHERE condition in a scalar subquery inside a HAVING condition of the main query block. (Bug #22967439)
- ST_GeomFromGeoJSON() treated JSON NULL as invalid input. Now it treats JSON NULL as SQL NULL and thus returns SQL NULL for JSON NULL input. (Bug #22930020, Bug #80712)
- For the host_summary_by_statement_latency and x$host_summary_by_statement_latency sys schema views, the max_latency column was incorrect. (Bug #22848110, Bug #80569)
- ST_Distance() could raise an assertion for NULL return values. (Bug #22760390)
- In the absence of SQL_CALC_FOUND_ROWS, FOUND_ROWS() for a UNION statement always returned the actual number of rows found even when LIMIT was present. (Bug #22602381, Bug #80148)
- A statement containing a format specifier resulted in a server exit when the query rewrite plugin tried to log the statement. (Bug #22601485)
- With the query cache enabled, executing a prepared statement with CURSOR_TYPE_READ_ONLY and then again with CURSOR_TYPE_NO_CURSOR caused the server to return an error. (Bug #22559575, Bug #80026)
- mysql_real_connect() was not thread-safe when invoked with the MYSQL_READ_DEFAULT_FILE or MYSQL_READ_DEFAULT_GROUP option enabled. (Bug #22322504, Bug #79510)
- With GTIDs enabled, XA COMMIT on a disconnected XA transaction within a multiple-statement transaction raised an assertion. (Bug #22173903)
- The sys schema create_synonym_db() function failed if the synonym name was a reserved word or contained backtick (`) characters. (Bug #22011361, Bug #78823)
- The sys schema host_summary view could fail with a division-by-zero error. (Bug #21970078)
- The GCC workaround for compiling on ARM64 added by Bug #21552524 is needed only for GCC before 5.2.1. (Bug #21845828)
- The sys schema format_path() function replaced substrings of the path name argument without verifying that the substrings were delimited by path name separators. Replacement now works correctly, including on Windows. A consequence is that backslashes in Windows path names are no longer converted to forward slashes in the result. (Bug #21512106)
- MySQL now supports compiling using the GCC __atomic builtins introduced in GCC 4.7 that permit a more efficient implementation of the MySQL atomics API. These __atomic builtins are only used for platforms where the old GCC __sync builtins are not available, such as PowerPC where the server otherwise would not build. (Bug #21221500)
- If a stored function updated a view for which the view table had a trigger defined that updated another table, it could fail and report an error that an existing table did not exist. (Bug #21142859, Bug #76808)
- mysql_upgrade failed to upgrade the sys schema if a sys database directory existed but was empty. (Bug #81352, Bug #23249846, Bug #22875519)
- The bundled Protobuf sources (under the extra directory) were upgraded from version 2.6.0 to 2.6.1. (Bug #81280, Bug #23213376)
- Protobuf is currently used only by the X plugin, but MySQL builds built the protobuf libraries and executables even if X plugin building was disabled with -DWITH_RAPID=0. (Bug #81066, Bug #23097750)
- On Solaris, a misaligned memory buffer could cause a server exit when selecting from the global_status Performance Schema table. (Bug #81065, Bug #23097305)
- A compilation error was corrected for a make_link() call when compiling in C++11 mode. Thanks for Daniel Black for the contribution. (Bug #80996, Bug #23080289)
- Two mysql-test-run.pl tests (ctype_gb18030_binlog and ctype_ldml) failed to produce repeatable output due to improper cleanup. Thanks to Daniel Black for the patch. (Bug #80896, Bug #23021095)
- MySQL failed to build with GCC 6 using the default mode for C++ of -std=gnu++14. The CMake configuration has been adjusted to explicitly set the mode to -std=gnu++03 for GCC 6. (Bug #80371, Bug #22732697)
- Ubuntu packages create the root user account using the auth_socket authentication plugin to achieve secure-by-default installation if installation was done with a blank root password. However, auth_socket was being used even if the password was not blank. (Bug #80137, Bug #22594846, Bug #23321113, Bug #81518)
- Compiling the InnoDB memcached plugin did not work on some platforms where MySQL was configured using -DWITH_LIBEVENT=system. (Bug #80073, Bug #22573379, Bug #23567441)
- The client-side plugin deinitialization function signature was changed from int (*deinit)() to int (*deinit)(void) to avoid warnings when compiling with -Wstrict-prototypes. (Bug #78177, Bug #21680094, Bug #81419, Bug #23282498)
- Several issues were addressed in the sys schema stored procedures that show enabled or disabled Performance

Schema setup:
- Enabled and disabled accounts were shown as host@user, not user@host.
- Disabled users in ps_setup_show_disabled were called enabled_users.
- ps_setup_show_enabled() showed disabled objects.
- setup_actors content was not filtered (all rows were returned whether the actor was enabled or disabled).
- Output order is more deterministic.