mysql

解決Laravel連接MySQL8驗證失敗錯誤

之前一直用MariaDB沒感覺,這次因為需求變動改用最新的MySQL 8 後, Laravel 就無法連接上資料庫了,囧。 對資料庫進行任何操作都出現了 The server requested authentication method unknown to the client 錯誤: Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Unity3D接入MySQL数据库

系統环境: * Windows 10(x64)(version 1909) * Unity3D (version 2018.3.0f2) * Microsoft Visual Studio Community 2017 (version 15.9.4) 操作步驟: * (1)准備一個本地或者綫上Mysql數據庫。Y Cheung 的數據庫設置如下: DATABASE Host: 127.0.0.1 DATABASE

Laravel Database Migrations中的 timestamps 與 nullableTimestamps

才知道Laravel Database Migrations 中的 timestamps和nullableTimestamps 在版本5.5之後數據庫中建立的是相同類型和屬性的column!!!好坑啊!!! 原文件(vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php)中指出: /** * Add nullable creation and update timestamps to the table. * * @param int $precision * @return void

MYSQL外鍵導致無法清空表

最近設計的數據庫表含有外鍵,結果在開發時truncate table的時候報錯了, SQL错误(1701):Cannot truncate a table referenced in a foreign key constraint (`rollcall2`.`oncall`, CONSTRAINT `FK__calls` FOREIGN KEY (`calls_id`) REFERENCES `rollcall2`.`calls` (`id`)) 解決辦法如下: SET FOREIGN_KEY_CHECKS

Aliyun MySQL Aborting

放了wordpress的主機最近經常掛掉,提示無法連結數據庫,檢查log信息發現是因為內存不足,把InnoDB的buffer pool size改小後似乎好了一些,可今天還是出錯了,log信息如下: 151210 6:45:23 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use