這是歷史版本頁面 — 看 MySQL (32-bit) 最新版本
裝了 MySQL 之後不知道怎麼開始?它能做什麼、該不該用
你剛把 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-5.7.12-win32.msi · 90.37 MB · 連結指向軟體原廠
版本紀錄
- 2026-08-04 MySQL 8.0.46.0 566 MB
- 2026-01-20 MySQL 8.0.45.0 556 MB
- 2025-10-22 MySQL 8.0.44.0 558 MB
再看 5 筆
- 2025-07-23 MySQL 8.0.43.0 354 MB
- 2025-07-22 MySQL 8.0.42.0 354 MB
- 2025-01-21 MySQL 8.0.41.0 352 MB
- 2024-10-16 MySQL 8.0.40.0 306 MB
- 2024-07-29 MySQL 8.0.39.0 285 MB
這一版改了什麼
What's new in this version:
Configuration Notes:
- Incompatible Change: To load a keyring plugin, the --early-plugin-load option is used. Previously, the default --early-plugin-load option value was the name of the keyring_file plugin library file. Now the default value is empty.
Important
- InnoDB tablespace encryption requires the keyring_file plugin to be loaded prior to InnoDB initialization, so this change of default --early-plugin-load value introduces an incompatibility for upgrades from 5.7.11 to 5.7.12 or higher. Administrators who have encrypted InnoDB tablespaces must take explicit action to ensure continued loading of the keyring_file plugin: Start the server with an --early-plugin-load option that names the plugin library file. For example, on platforms where the plugin library file suffix is .so, use these lines in the server my.cnf file: [mysqld] early-plugin-load=keyring_file.so
- On other platforms, adjust the file name suffix as necessary. For more information, see The MySQL Keyring.
Security Notes:
- InnoDB: The InnoDB tablespace encryption feature, which provides at-rest data encryption for InnoDB tables, now supports Oracle Key Vault for encryption key management. Oracle Key Vault support relies on the keyring_okv plugin which is available in MySQL Enterprise Edition. A secure and robust encryption key management solution such as OKV is critical for security and for compliance with various security standards. For more information, see InnoDB Tablespace Encryption.
- The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.1s. Issues fixed in the new version are described at http://www.openssl.org/news/vulnerabilities.html.
- This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #22685885, Bug #22923458)
- MySQL Enterprise Edition now includes a keyring_okv plugin that uses Oracle Key Vault for keyring backend storage. For more information, see The MySQL Keyring.
Functionality Added or Changed:
- For queries with many OR conditions, the optimizer now is more memory-efficient and less likely to exceed the memory limit imposed by the range_optimizer_max_mem_size system variable. In addition, the default value for that variable has been raised from 1536000 to 8388608. (Bug #79450, Bug #22283790)
Bugs Fixed:
- InnoDB; Partitioning: INSERT and SELECT statements against a partitioned InnoDB table having generated columns were not always handled correctly. (Bug #22444530)
- References: See also Bug #21776494, Bug #21824564, Bug #21864838.
- InnoDB: An error was returned on startup when a replication slave attempted to access an encrypted table. The server UUID used to compose the master key name was not persisted to the tablespace data file, resulting in the use of an incorrect master key. (Bug #22912582)
- InnoDB: In debug builds, an unnecessary buf_block_align() call could cause a latching order violation. A DML operation resulted in a page mismatch assertion due to the same buf_block_align() call. (Bug #22709463, Bug #21321238)
- InnoDB: An ALTER TABLE ... ADD COLUMN operation on a table with virtual columns raised an assertion. (Bug #22650296)
- InnoDB: An unnecessary comparison in tablespace encryption code caused compiler warnings. (Bug #22645816)
- InnoDB: INNODB_SYS_TABLESPACES could report incorrect ALLOCATED_SIZE and FILE_SIZE values for a general tablespace created outside of the data directory. The i_s_dict_fill_sys_tablespaces() function generated an incorrect remote file path. (Bug #22590095, Bug #80070)
- InnoDB: In debug builds, an update operation on a table with virtual columns raised an assertion. (Bug #22572997)
- InnoDB: Modifications were made to InnoDB code to handle warnings when compiling with Microsoft Visual Studio 2015. (Bug #22542547, Bug #79964)
- InnoDB: Running REPLACE operations on multiple connections resulted in a hang. (Bug #22530768, Bug #79185)
- InnoDB: Tabespace encryption-related operations resulted in a hang on FreeBSD. (Bug #22520464, Bug #79901)
- InnoDB: MySQL stalled when syncing the InnoDB full-text index cache. (Bug #22516559, Bug #16510576, Bug #73816)
- InnoDB: A CREATE TABLE ... DATA DIRECTORY operation failed to create a table while innodb_flush_method was set to O_DIRECT. (Bug #22180006, Bug #79200)
- References: This bug is a regression of Bug #21113036.
- InnoDB: In debug builds, a buffer pool resizing operation resulted in a segmentation violation. The buf_pool_resizing variable was not protected. (Bug #22179317)
- InnoDB: The innodb_open_files setting could exceed the open files limit. (Bug #22111472)
- InnoDB: InnoDB attempted crc32 checksum validation instead of innodb after a crc32 checksum validation failure, causing repeated crc32 checksum validation attempts. Checksum validation order is now optimized dynamically.
- Thanks to Daniel Black for the patch. (Bug #79725, Bug #22452597)
- Replication: The recovery channel must be set using the CHANGE MASTER command, and the plugin will not set default values for the user or password fields in CHANGE MASTER. The server side recovery channel is restricted to MASTER_USER and MASTER_PASSWORD, whereas all other settings for the change master are added on the plugin side, as done previously. Attempting to use other values will emit ER_SLAVE_CHANNEL_OPERATION_NOT_ALLOWED errors. The password value used on CHANGE MASTER commands for the recovery channel is not logged as plain text in any log or history files. Also, at the end of recovery, the plugin no longer resets info objects, but does continue to purge the logs. (Bug #22815932)
- Replication: When a binlog-less slave connected to a GR master, it failed with "Error running query" in the error log. But, there was no information available in "SHOW SLAVE STATUS" or P_S.replication_applier_status_by_worker. (Bug #22699395)
- Replication: Setting the relay log recovery to 1 could generate an error during recovery. Once the relay log recovery happened, repositories were not initiated and the server reported an error related to this. Also, attempting to execute "START GROUP_REPLICATION" in this situation could cause a crash. To fix this, the recovery procedure will no longer take the group_replication_channel into consideration. It now skips the relay logs of the GR channel to proceed further. (Bug #22523554)
- Replication: Issuing STOP SLAVE caused a spurious Error reading packet from server: Lost connection to MySQL server during query message to be written to the error log. With this fix, when connection to the master is lost, the abort_slave flag is checked and the error message is printed only if the flag is not set. (Bug #22305605, Bug #79504)
- References: See also Bug #12977988, Bug #22290309.
- Replication: When binlog was disabled, the GTID specified by GTID_NEXT when committing an empty transaction caused by a 'BEGIN' command was being saved into GLOBAL@gtid_executed when it should not have been. However, when binlog was enabled, the same situation did not save it.
- Now, when "@@SESSION.GTID_NEXT == 'UUID:NUMBER'", the 'BEGIN' command causes an 'ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET' error inside an empty or non-empty transaction regardless of the binlog setting, since it causes an implicit commit like other DDLs. In this case, the GTID specified by GTID_NEXT is not saved into GLOBAL@gtid_executed. (Bug #22130929)
- Replication: When replication was configured but not started on a slave, the variable currently_executing_gtid was not properly initialized, but it would be used if the performance_schema table replication_applier_status_by_worker was queried, causing assertion failures and pointer issues. With this fix, the variable is now properly initialized at the construction of the Relay_log_info object. (Bug #21953132, Bug #78722)
- Replication: RESET SLAVE ALL could delete a channel even when master_pos_wait and wait_until_sql_thread_after_gtid were still waiting for binlog to be applied. This could cause a MySQL server exit when the functions tried to access the channel that was deleted. Now, a channel reference counter was added that is increased if the channel should not be deleted when the functions are running. RESET SLAVE ALL will wait for no reference, and then it will delete the channel. (Bug #21842399, Bug #78445)
- Replication: When relay_log_recovery=1, a slave server, at its initialization, still tried to scan the relay log files in order to update Retrieved_Gtid_Set and the transaction parser state, which was an unnecessary waste of resources because the slave I/O thread would just be initialized to the SQL thread position in the new relay log file. With this fix, the slave server skips scanning the relay log files when relay_log_recovery=1. (Bug #21798355, Bug #78352)
- Replication: In Slave_worker::write_info(), DBUG_ENTER() had “Master_info::write_info” as its argument instead of “Slave_worker::write_info”. This fix corrects the argument. Thanks to Stewart Smith for the patch. (Bug #21658067, Bug #78133)
- Replication: XA transactions were not handled correctly when --gtid-mode=ON and the binary log was disabled. It was because on both master and slave servers, the GTID state was sometimes not saved and the GTID ownership was sometimes not cleaned up. This fix makes sure those steps are now properly performed. (Bug #21618727)
- References: See also Bug #22165138, Bug #77740, Bug #21452916.
- Replication: When a multi-threaded slave stopped with an error, the same error message was printed three times. Now, the SQL thread's kill acceptance status is saved, and only printed once. (Bug #21198611, Bug #77237)
- Replication: When using a multi-threaded slave with relay_log_info_repository set to TABLE, the slave applier thread failed to write XA transactions to the worker configuration. (Bug #20988291)
- Replication: mysqlbinlog --verbose displayed BINARY and VARBINARY data as ordinary strings, causing any single quote (“'”) or backslash (“”) among the data to be printed as such, which was confusing to the users and, in the case of a backslash, caused the next character to be skipped. This fix makes mysqlbinlog print the characters' hexadecimal values (“x27” for single quote and “x5c” for backslash) instead. (Bug #20836250)
- Replication: The test case main.merge failed when the variables binlog_format was set to “ROW,” as the server tried to get information for table creation for a child table before it was opened. With this fix, the server skips getting information for the table in the situation. (Bug #20574550)
- Replication: If a query on a master generated an error and partial results were written to the binary log, for example due to a DROP TABLE IF EXISTS statement applying to multiple tables that would break foreign key constraints, when a slave configured with replication filters encountered the query it could be incorrectly binary logged. This caused errors such as:
- Last_SQL_Error: Query caused different errors on master and slave. Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217 ; Error on slave: actual message='no error', error code=0. Default database: 'db1'. Query: 'DROP TABLE IF EXISTS `table1` /* generated by server */'
- There were two fixes required for this bug.
- If a DROP TABLE statement used to drop a single table fails, to avoid partial results causing this bug the query is not written to the binary log. If a DROP TABLE statement used to drop a list of tables fails, any partial results it generates are written to the binary log with an error.
- When a query that generates an error as expected was received by a slave but it was skipped due to replication filters, the slave was incorrectly checking the error. The fix for Bug #76493 ensures that this comparison of the expected error from the master with the actual error from the slave does not happen.
- References: See also Bug #20797764.
- RTRIM() on large strings could be very slow. (Bug #22884187)
- References: This bug was introduced by Bug #18315770, Bug #12368495.
- Integer overflow could occur during client handshake processing, leading to a server exit. (Bug #22722946)
- Missing initializers in the query plan constructor resulted in Valgrind warnings. (Bug #22573117)
- The obsolete support-files/MySQL-shared-compat.spec.sh file was removed from distributions. (Bug #22525609)
- mysqlpump failed (syntax error) when a view name contained a space character. View names are now quoted. (Bug #22505474)
- UNHEX() with an invalid argument could result in garbage characters in the warning message. (Bug #22358933)
- Improper host name checking in X509 certificates could permit man-in-the-middle attacks. (Bug #22295186, Bug #22738607)
- For debug builds, when an indexed nonnullable generated column with an empty string generated expression was updated during an insert for a duplicated key, there was an optimization that resulted in the server failing to find the duplicated index, causing an assertion to be raised. (Bug #22195364)
- A boolean mode full-text search caused a segmentation fault. (Bug #22176795)
- Queries on generated columns that used WITH ROLLUP could raise an assertion. (Bug #22131343)
- For a prepared statement that used a derived table, an assertion could be raised at execute time when checking statement privileges. (Bug #22108567)
- Concurrent selecting and flushing of a FEDERATED table while killing connections accessing it could result in a server exit. (Bug #21918190)
- For debug builds, when a query using join buffering and one of the tables inserted into the join buffer was accessed using a dynamic range scan on an index containing a virtual column, a Valgrind error occurred when writing columns to the join buffer. (Bug #21872184)
- After iterations of uninstalling and installing the audit_log plugin, the server could hang. (Bug #21796658)
- With a LOCK TABLES statement in effect, access to Performance Schema tables could fail, as could SHOW STATUS with show_compatibility_56=OFF. (Bug #21789221)
- Executing GRANT PROXY statements after altering the definition of the mysql.user system table could result in a server exit. (Bug #21699037)
- Certain error messages included part of the SQL statement that produced them, possibly exposing data. (Bug #21682356)
- The Performance Schema assumed that tables named using a #sql prefix were temporary and could be ignored. But it is possible to create nontemporary tables using that prefix. The Performance Schema now uses table attributes other than the name to identify temporary tables. (Bug #21105475, Bug #22532368, Bug #79934)
- Account filtering performed by the audit_log plugin incorrectly used the account named by the USER() function rather than the CURRENT_USER() function (the latter being the account used for authentication). (Bug #19509471)
- NAME_CONST() can return null if incorrect arguments are given. In some cases, this was not handled and could cause a server exit. (Bug #19143243)
- Character set conversion operations on NULL parameters to prepared statements could cause a server exit. (Bug #18823979)
- Loose Index Scan was not chosen for queries that had an equality condition. (Bug #18109609)
- Long or complex SQL statements could cause the parser to run out of memory. The new parser_max_mem_size system variable now enables control over the maximum amount of memory available to the parser. The default value places no limit on memory available, but the value can be reduced to protect against out-of-memory situations. (Bug #14744160)
- A Valgrind warning for memory_free_noop() was silenced. (Bug #80457, Bug #22782197)
- The MySQL server failed to start if built with the -m32 option on Solaris/Sparc, due to improper static data alignment in init_delegates(). (Bug #80445, Bug #22763880)
- The plugin_keyring.h header file misspelled st_mysql_keyring as st_mysql_keyring_file. (Bug #80414, Bug #22748867)
- For shared-memory connections on Windows, the client library opened a handle on a mutex but did not close it. Subsequent attempts to restart the server on the other end of the connection failed if the client still had the mutex handle open. (Bug #80234, Bug #22646779)
- mysqld attempted to initialize plugins specified using the --early-plugin-load option when the --help option was specified. (Bug #80077, Bug #22573767)
- ALTER USER IDENTIFIED WITH ... expired the account password, even if the authentication plugin did not support password expiration. (Bug #79999, Bug #22551523)
- Some Performance Schema global instruments, if not enabled at server startup, could be in a state where it was not possible to enable them at runtime. This restriction has been lifted. Affected instruments include mutex, rwlock, cond, and socket instances.
- Thanks to Zhang Yingqiang for the patch. (Bug #79784, Bug #22517278)
- Setting the super_read_only system variable at server startup had no effect. (Bug #79328, Bug #22233503)
- These audit_log plugin issues were corrected:
- Calling my_message() from the MYSQL_AUDIT_GENERAL_CLASS handler resulted in infinite recursion.
- Diagnostic messages were improved for the case when the MYSQL_AUDIT_GENERAL_CLASS handler returned nonzero.
- Calling my_message() from the MYSQL_AUDIT_SERVER_STARTUP_CLASS handler did not abort server startup as it should have.
- SHOW GLOBAL VARIABLES produced different output for the null_audit_abort_value system variable with show_compatibility_56 enabled and disabled.
- For INSERT and UPDATE operations that caused FOREIGN KEY constraint violations, errors were reported rather than warnings when the IGNORE keyword was used. (Bug #78853, Bug #22037930)
- Using the server session service, executing an SQL statement from a thread with no VIO context could raise an assertion. (Bug #78734, Bug #21959409)
- Error messages raised by JSON_KEYS() and JSON_EXTRACT() contained the wrong data. (Bug #78699, Bug #22026278)
- CREATE VIEW statements that used the TIMESTAMPDIFF() function with MICROSECOND as the unit resulted in incorrect view definitions. (Bug #78506, Bug #21877062)
- For an existing user, CREATE USER IF NOT EXISTS produced an error rather than a warning. Similarly, for an nonexisting user, ALTER USER IF EXISTS produced an error rather than a warning. (Bug #78374, Bug #21807286)
- For some queries, an Index Merge access plan was chosen over a range scan when the cost for the range scan was the same or less. (Bug #77209, Bug #21178196)
- UNHEX() could attempt a left shift of a negative number. (Bug #73964, Bug #19642015)
- EXPLAIN for SELECT ... FOR UPDATE statements acquired locks. (Bug #72858, Bug #18899860)
- Processlist state information was not updated correctly for LOAD DATA INFILE and could show a state different from executing. (Bug #69375, Bug #16912362)