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

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

MySQL (64-bit) 軟體圖示 MySQL (64-bit) 5.6.17 (64-bit) 資料更新 2014-03-28 閱讀約 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.6.17-winx64.msi · 40.9 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

Functionality Added or Changed:
- Incompatible Change - The AES_ENCRYPT() and AES_DECRYPT() functions now permit control of the block encryption mode and take an optional initialization vector argument.
- The new block_encryption_mode system variable controls the mode for block-based encryption algorithms. Its default value is aes-128-ecb, which signifies encryption using a key length of 128 bits and ECB mode.
- An optional init_vector argument provides an initialization vector for encryption modes that require it.
- AES_ENCRYPT(str,key_str[,init_vector])
- AES_DECRYPT(crypt_str,key_str[,init_vector])
- A random string of bytes to use for the initialization vector can be produced by calling the new RANDOM_BYTES() function.
- For more information, see Encryption and Compression Functions.
- These changes make statements that use AES_ENCRYPT() or AES_DECRYPT() unsafe for statement-based replication and they cannot be stored in the query cache. Queries that use RANDOM_BYTES() are unsafe for statement-based replication and cannot be stored in the query cache.
- Incompatible Change - The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes now do nothing. Instead, their previous effects are included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). In other words, strict mode now means the same thing as the previous meaning of strict mode plus the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE modes. This change reduces the number of SQL modes with an effect dependent on strict mode and makes them part of strict mode itself.
- To prepare for the SQL mode changes in this version of MySQL, it is advisable before upgrading to read SQL Mode Changes in MySQL 5.7. That discussion provides guidelines to assess whether your applications will be affected by these changes.
- The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes are still recognized so that statements that name them do not produce an error, but will be removed in a future version of MySQL. To make advance preparation for versions of MySQL in which these modes do not exist, applications should be modified to not refer to those mode names. InnoDB - MySQL now supports rebuilding regular and partitioned InnoDB tables using online DDL (ALGORITHM=INPLACE) for the following operations:
- OPTIMIZE TABLE
- ALTER TABLE ... FORCE
- ALTER TABLE ... ENGINE=INNODB (when run on an InnoDB table)
- Online DDL support reduces table rebuild time and permits concurrent DML, which helps reduce user application downtime. For additional information, see Overview of Online DDL. (Bug #13975225)
- On Solaris, mysql_config --libs now includes -R/path/to/library so that libraries can be found at runtime. (Bug #18235669)
- mysql_install_db provides a more informative diagnostic message when required Perl modules are missing. (Bug #69844, Bug #18187451)
- The IGNORE clause for ALTER TABLE is now deprecated and will be removed in a future version of MySQL. ALTER IGNORE TABLE causes problems for replication, prevents online ALTER TABLE for unique index creation, and causes problems with foreign keys (rows removed in the parent table). Bugs Fixed:
- Incompatible Change: Old clients (older than MySQL 5.5.7) failed to parse authentication data correctly if the server was started with the --default-authentication-plugin=sha256_password option.
- Note - As a result of this bug fix, MySQL 5.6.16 clients cannot connect to a 5.6.17 server using an account that authenticates with the sha256_password plugin. Similarly, MySQL 5.7.3 clients cannot connect to a 5.7.4 server using an account that authenticates with the sha256_password plugin. (Bug #17495562)
- Important Change; InnoDB; Partitioning: The FLUSH TABLES statement's FOR EXPORT option is now supported for partitioned InnoDB tables. (Bug #16943907)
- InnoDB: Running a SELECT on a partitioned table caused a memory access violation in memcpy(). (Bug #18383840)
- InnoDB: An invalid memmove in fts_query_fetch_document would cause a serious error. (Bug #18229433)
- InnoDB: For full-text queries, a failure to check that num_token is less than max_proximity_item could result in an assertion. (Bug #18233051)
- InnoDB: innodb_ft_result_cache_limit now has a hardcoded maximum value of 4294967295 bytes or (2**32 -1). The maximum value was previously defined as the maximum value of ulong. (Bug #18180057, Bug #71554)
- InnoDB: InnoDB would fail to restore a corrupt first page of a system tablespace data file from the doublewrite buffer, resulting in a startup failure. (Bug #18144349, Bug #18058884)
- InnoDB: An UPDATE resulted in a memory access error in lock_rec_other_trx_holds_expl. The transaction list (trx_sys->rw_trx_list) was traversed without acquiring the transaction subsystem mutex (trx_sys->mutex). (Bug #18161853)
- InnoDB: A regression introduced by Bug #14329288 would result in a performance degradation when a compressed table does not fit into memory. (Bug #18124788, Bug #71436)
- InnoDB: The maximum value for innodb_thread_sleep_delay is now 1000000 microseconds. The previous maximum value (4294967295 microseconds on 32-bit and 18446744073709551615 microseconds on 64-bit) was unnecessarily large. Because the maximum value of innodb_thread_sleep_delay is limited by the value set for innodb_adaptive_max_sleep_delay (when set to a non-zero value), the maximum value for innodb_thread_sleep_delay is now the same as the maximum value for innodb_adaptive_max_sleep_delay. (Bug #18117322)
- InnoDB: A full-text tokenizer thread would terminate with an incorrect error message. (Bug #18021306)
- InnoDB: Attempting to uninstall the InnoDB memcached plugin while the InnoDB memcached plugin is still initializing would kill the InnoDB memcached daemon thread. Uninstall should wait until initialization is complete. (Bug #18038948)
- InnoDB: In debug builds, creating a unique index on a binary column, with input data containing duplicate keys, would cause an assertion. (Bug #18010711)
- InnoDB: The srv_monitor_thread would crash in the lock_print_info_summary() function due to a race condition between the srv_monitor_thread and purge coordinator thread. (Bug #17980590, Bug #70430)
- InnoDB: Attempting to add an invalid foreign key when foreign key checking is disabled (foreign_key_checks=0) would cause a serious error. (Bug #17666774)
- InnoDB: For debug builds, the table rebuilding variant of online ALTER TABLE, when run on tables with BLOB columns, would cause an assertion in the row_log_table_apply_update function. For normal builds, a DB_PRODUCTION error would be returned. (Bug #17661919)
- InnoDB: When creating a table there are a minimum of three separate inserts on the mysql.innodb_index_stats table. To improve CREATE TABLE performance, there is now a single COMMIT operation instead of one for each insert. (Bug #17323202, Bug #70063)
- InnoDB: The server would halt with an assertion in lock_rec_has_to_wait_in_queue(lock) due to a locking-related issue and a transaction being prematurely removed from trx_sys->rw_trx_set. (Bug #17320977)
- InnoDB: Server shutdown would result in a hang with the following message written to the error log: “[NOTE] InnoDB: Waiting for purge thread to be suspended.” (Bug #16495065)
- InnoDB: InnoDB would fail to start when innodb_data_file_path specified the data file size in kilobytes by appending K to the size value. (Bug #16287752)
- InnoDB: An insert buffer merge would cause an assertion error due to incorrectly handled ownership information for externally stored BLOBs.
- InnoDB: Assertion failure in thread thread_num in file ibuf0ibuf.cc line 4080
- InnoDB: Failing assertion: rec_get_deleted_flag(rec, page_is_comp(page)) Bug #14668683)
- InnoDB: Decreasing the auto_increment_increment value would have no affect on the next auto-increment value. (Bug #14049391, Bug #65225)
- Partitioning: When the index_merge_intersection flag (enabled by default) or the index_merge_union flag was enabled by the setting of the optimizer_switch system variable, queries returned incorrect results when executed against partitoned tables that used the MyISAM storage engine, as well as partitioned InnoDB tables that lacked a primary key. (Bug #18167648)
- References: See also Bug #16862316, Bug #17588348, Bug #17648468.
- Replication: The MASTER_SSL_CRL and MASTER_SSL_CRLPATH options are not available when using yaSSL; MySQL Replication now sets these to NULL automatically whenever yaSSL is enabled. (Bug #18165937)
- Replication: Setting --slave-parallel-workers to 1 or greater and starting the slave caused the slave SQL thread to use but not release memory until the slave was restarted with STOP SLAVE and START SLAVE. (Bug #18001777, Bug #71197)
- Replication: When a slave was configured with replication filters and --log-warnings=2, every statement which was filtered caused an entry to be written in the error log. For busy servers which generated many statements to be filtered, the result was that the error log could quickly grow to many gigabytes in size. Now a throttle is used for such errors, so that an error message is printed only once in a given interval, saying that this particular error occurred a specific number of times during that interval. (Bug #17986385)
- Replication: SHOW SLAVE STATUS used incorrect values when reporting MASTER_SSL_CRL and MASTER_SSL_CRLPATH. (Bug #17772911, Bug #70866)
- References: This bug was introduced by Bug #11747191.
- Replication - Binary log events could be sent to slaves before they were flushed to disk on the master, even when sync_binlog was set to 1. This could lead to either of those of the following two issues when the master was restarted following a crash of the operating system.
- Replication cannot continue because one or more slaves are requesting replicate events that do not exist on the master.
- Data exists on one or more slaves, but not on the master.
- Such problems are expected on less durable settings (sync_binlog not equal to 1), but it should not happen when sync_binlog is 1. To fix this issue, a lock (LOCK_log) is now held during synchronization, and is released only after the binary events are actually written to disk. (Bug #17632285, Bug #70669)
- Replication: When running the slave with --slave-parallel-workers at 1 or greater, setting --slave-skip-errors=all caused the error log to be filled with with instances of the warning Slave SQL: Could not execute Query event. Detailed error: ;, Error_code: 0. (Bug #17581990, Bug #68429)
- References: See also Bug #17986385.
- Replication: A number of possible state messages used as values for the PROCESSLIST_STATE column of the Performance Schema threads table were longer than the width of the column (64 characters).
- The long state messages are now silently truncated in order to avoid errors. This fix applies in MySQL 5.6 only; a permanent fix for the issue is made in MySQL 5.7 and later. (Bug #17319380)
- Replication: The server did not handle correctly the insertion of a row larger than 4 GB when using row-based replication. (Bug #17081415)
- Replication: When using row-based replication, an additional auto-increment column on the slave version of a table was not updated correctly; a zero was inserted instead. (Bug #17066269, Bug #69680)
- Replication: Statements involving the Performance Schema tables should not be written to the binary log, because the content of these tables is applicable only to a given MySQL Server instance, and may differ greatly between different servers in a replication topology. The database administrator should be able to configure (INSERT, UPDATE, or DELETE) or flush (TRUNCATE TABLE) performance schema tables on a single server without affecting others. However, when replicating from a MySQL 5.5 master to a MySQL 5.5 or later slave, warnings about unsafe statements updating Performance Schema tables were elevated to errors. For MySQL 5.6 and later slaves, this prevented the simultaneous use of performance_schema and GTIDs (see Replication with Global Transaction Identifiers).
- This fix causes all updates on tables in the performance_schema database to be filtered on the master and not replicated, regardless of the type of logging that is in effect. Prior to this fix, statements using were handled by being marked as unsafe for replication, which caused warnings during execution; the statements were nonetheless written to the binary log, regardless of the logging format in effect.
- Existing replication behavior for tables in the INFORMATION_SCHEMA database is not changed by this fix.
- For more information, see MySQL Performance Schema. (Bug #16814264)
- References: See also Bug #14741537, Bug #18259193.
- Replication: Modifying large amounts of data within a transaction can cause the creation of temporary files. Such files are created when the size of the data modified exceeds the size of the binary log cache (max_binlog_cache_size). Previously, such files persisted until the client connection was closed, which could allow them to grow until they exhausted all available disk space in tmpdir. To prevent this from occurring, the size of a temporary file created in this way in a given transaction is now reset to 0 when the transaction is committed or rolled back. (Bug #15909788, Bug #18021493, Bug #66237)
- Replication: The server checks to determine whether semisynchronous replication has been enabled without a lock, and if this is the case, it takes the lock and checks again. If semisynchronous replication was disabled after the first but prior to the second one, this could cause the server to fail. (Bug #14511533, Bug #66411)
- References: See also Bug #17920923.
- Replication: Semisynchronous replication became very slow if there were many dump threads (such as from mysqlbinlog or slave I/O connections) working at the same time. It was also found that semisynchronous master plugin functions were called even when the dump connections did not support semisynchronous replication, which led to locking of the plugin lock as well as wasting time on necessary code.
- After this fix, non-semisynchronous dump threads no longer call semisynchronous master functions to observe binary events. (Bug #70218, Bug #17434690)
- mysql_install_db could hang while reading /dev/random to generate a random root password. (Bug #18395378)
- Compilation failed if MySQL was configured with CFLAGS set to include a -Werror option with an argument. (Bug #18173037)
- A shared libmysqld embedded server library was not built on Linux. (Bug #18123048, Bug #16430656, Bug #68559)
- While printing the server version, the mysql client did not check for buffer overflow in a string variable. (Bug #18186103)
- Building MySQL from source on Windows using Visual Studio 2008 would fail with an identifier not found error due to a regression introduced by the patch for Bug#16249481. (Bug #18057449)
- On Microsoft Windows, the rw-lock backup implementation for the my_atomic_* functions was always used. Now, the native Microsoft Windows implementation is used, where available. (Bug #18054042)
- When tables are reopened from the table cache and the current thread is not instrumented for the Performance Schema, a table handle was unnecessarily instrumented. (Bug #18047865)
- The audit log plugin could cause a server exit during log file rotation operations when there were many operations happening for multiple connections. (Bug #17930339)
- The SUM_SORT_MERGE_PASSES column value in the Performance Schema events_statements_summary_by_digest table was calculated incorrectly. (Bug #17938255)
- If the Performance Schema events_statements_summary_by_digest table was full when a statement with a new digest was found, the Performance_schema_digest_lost status variable was not incremented. (Bug #17935314)
- The optimizer could push down a condition when the index did not have the key part present in the condition. (Bug #17814492)
- Contraction information in a collation could be mishandled, resulting in incorrect decisions about whether a character is part of a contraction, and miscalculation of contraction weights. (Bug #17760379)
- DROP TRIGGER succeeded even with the read_only system variable enabled. (Bug #17503460)
- If used to process a prepared CALL statement for a stored procedure with OUT or INOUT parameters, mysql_stmt_store_result() did not properly set the flags required to retrieve all the result sets. (Bug #14492429, Bug #17849978)
- When run by root, mysqld --help --verbose exited with a nonzero error code after displaying the help message. (Bug #70058, Bug #17324415)
- MySQL client programs from a Community Edition distribution could not connect using SSL to a MySQL server from an Enterprise Edition. This was due to a difference in certificate handling by yaSSL and OpenSSL (used for Community and Enterprise, respectively). OpenSSL expected a blank certificate to be sent when not all of the --ssl-ca, --ssl-cert, and --ssl-key options were specified, and yaSSL did not do so. To resolve this, yaSSL has been modified to send a blank certificate when an option is missing. (Bug #68788, Bug #16715064)
- The mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlslap, and mysqlshow programs now support a --secure-auth option that prevents sending passwords to the server in old (pre-4.1) format. This option is enabled by default; use --skip-secure-auth to disable it. (Bug #69051, Bug #16723046)
- A deadlock error occurring during subquery execution could cause an assertion to be raised. (Bug #69969, Bug #17307201)
- The Performance Schema stage/sql/Waiting to get readlock instrument is no longer used and has been removed. (Bug #71298, Bug #18035404)
- A query that creates a temporary table to find distinct values and has a constant value in the projected list could produce incorrect results. (Bug #70657, Bug #17634335)
- Messages written by the server to the error log for LDML collation definition problems were missing the collation name. (Bug #68144, Bug #16204175)
- mysqlcheck did not correctly handle table names containing dots. (Bug #68015, Bug #16064833)
- Aggregating the results of a subquery in the FROM clause could produce incorrect results. (Bug #71244, Bug #18014565)
- For system variables that take a string value, SET statements permitted an unquoted value, but values that contained dots were parsed incorrectly and only part of the value was assigned. For example, SET GLOBAL slow_query_log_file = my_slow.log assigned the value my_slow. Now such values must be quoted or an error occurs. (Bug #69703, Bug #17075846)
- A temporal literal string without delimiters and more than 14 digits was validated as a TIMESTAMP/DATETIME value with a two-digit precision fractional seconds part. But fractional seconds should always be separated from other parts of a time by a decimal point. (Bug #69714, Bug #17080703)
- The msql2mysql, mysql_convert_table_format, mysql_find_rows, mysql_fix_extensions, mysql_setpermission, and mysqlaccess utilities are now deprecated and will be removed in MySQL 5.7. (Bug #27482, Bug #69012, Bug #69014, Bug #69015, Bug #69016, Bug #69017, Bug #11746603, Bug #16699248, Bug #16699279, Bug #16699284, Bug #16699317, Bug #18179576)