14,953
edits
m (→References) |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 59: | Line 59: | ||
* 檢查 mysql 數據文件夾所在的磁碟空間是否足夠。例如,在 {{Linux}} 上輸入 {{kbd | key=df -h}} | * 檢查 mysql 數據文件夾所在的磁碟空間是否足夠。例如,在 {{Linux}} 上輸入 {{kbd | key=df -h}} | ||
* 更多資訊請見 [http://stackoverflow.com/questions/18719748/error-1006-hy000-cant-create-database-errno-13-mysql-5-6-12 ERROR 1006 (HY000) 無法創建資料庫 (errno: 13) MySQL 5.6.12 - Stack Overflow]。 | * 更多資訊請見 [http://stackoverflow.com/questions/18719748/error-1006-hy000-cant-create-database-errno-13-mysql-5-6-12 ERROR 1006 (HY000) 無法創建資料庫 (errno: 13) MySQL 5.6.12 - Stack Overflow]。 | ||
=== ERROR 1010: Error dropping database (can't rmdir) === | |||
Message: <pre>Error dropping database (can't rmdir '.\<db_name>\', errno: 17)</pre> | |||
解決方式 | |||
* 手動刪除資料庫目錄中殘留的非 MySQL 檔案(例如 .sql 檔案),再重新執行 DROP DATABASE;或直接手動刪除整個資料夾。 | |||
根本原因 | |||
* MySQL 的 DROP DATABASE 只會移除它所管理的檔案。資料目錄中若存在其他外來檔案(例如 .sql 備份檔),將導致 rmdir 無法移除資料夾,進而觸發 errno 17(ENOTEMPTY)。 | |||
=== ERROR 1017 - Can't find file: '.\DATABASE\TABLE.frm' (errno: 22 - Invalid argument) === | === ERROR 1017 - Can't find file: '.\DATABASE\TABLE.frm' (errno: 22 - Invalid argument) === | ||
| Line 437: | Line 446: | ||
* [https://www.eversql.com/sql-syntax-check-validator/ SQL 語法檢查在線上,SQL 驗證器,即時 SQL 編譯器在線上 - EverSQL] {{exclaim}} 不支持 [https://www.php.net/manual/en/pdo.prepare.php PHP: PDO::prepare],其中查詢語法包含問號。 | * [https://www.eversql.com/sql-syntax-check-validator/ SQL 語法檢查在線上,SQL 驗證器,即時 SQL 編譯器在線上 - EverSQL] {{exclaim}} 不支持 [https://www.php.net/manual/en/pdo.prepare.php PHP: PDO::prepare],其中查詢語法包含問號。 | ||
== | == 連接和網路錯誤 == | ||
=== MySQL 伺服器已斷開 (has gone away) === | === MySQL 伺服器已斷開 (has gone away) === | ||
步驟 | 步驟 | ||
| Line 523: | Line 532: | ||
INSERT IGNORE INTO `target`.`table` SELECT * FROM `source`.`table` LIMIT 0, 10000; | INSERT IGNORE INTO `target`.`table` SELECT * FROM `source`.`table` LIMIT 0, 10000; | ||
</pre> | </pre> | ||
=== 從 MySQL 資料轉移至 MSSQL === | |||
情況: 需要將 MySQL 資料庫中的資料同步或遷移至 Microsoft SQL Server。 | |||
解決方案: | |||
* (手動方式) 匯出 MySQL 資料為 MSSQL 相容格式: {{kbd | key=<nowiki>mysqldump --compatible=mssql [database_name]</nowiki>}}<ref>[https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html#option_mysqldump_compatible MySQL :: MySQL 8.4 Reference Manual :: 6.5.4 mysqldump — A Database Backup Program]</ref> | |||
* (自動方式) 使用 [https://learn.microsoft.com/en-us/sql/ssma/sql-server-migration-assistant?view=sql-server-ver17 Microsoft SQL Server Migration Assistant]、''$'' [https://www.webyog.com/product/sqlyog SQLyog] 工具 (適用於 {{Win}})。設定特定查詢來控制要從 MySQL 轉移至 Microsoft SQL Server 的資料。 | |||
常見挑戰: | |||
* 大型資料集的連線逾時問題: 參考 2013 錯誤的故障排除方法,例如延長逾時參數或實施批次處理。 | |||
* 資料類型不相容: 在遷移前驗證兩系統間的類型對應,以防止資料損壞或遺失。 | |||
== 資源和環境錯誤 == | == 資源和環境錯誤 == | ||
| Line 710: | Line 730: | ||
<references/> | <references/> | ||
{{Template: | {{Template: Data factory flow in Mandarin}} | ||
[[Category: MySQL]] | [[Category: MySQL]] | ||