diff --git a/man/en/faq.md b/man/en/faq.md index 87b5a61..58ef963 100644 --- a/man/en/faq.md +++ b/man/en/faq.md @@ -226,3 +226,18 @@ Another solution is modify your Apache configuration file, and append a new line ``` AddType application/wasm .wasm ``` + +## MySQL reports "Specified key was too long..." + +This problem usually occurs on Windows. + +The best solution is using Linux as the operating system for your server. This not only solves this problem, but also avoids some other weird problems which only occur on Windows. + +However, you may want to solve this problem temporarily. You can modify configuration file of MySQL. Open `my.ini`, then find `[mysql]` section, and append two lines below: + +```ini +innodb_large_prefix=ON +innodb_file_format=Barracuda +``` + +Save the file and restart MySQL service. \ No newline at end of file diff --git a/man/faq.md b/man/faq.md index 4e1d1a0..a6cb3b2 100644 --- a/man/faq.md +++ b/man/faq.md @@ -259,3 +259,18 @@ application/wasm wasm ``` AddType application/wasm .wasm ``` + +## MySQL 提示「Specified key was too long...」 + +这往往发生在 Windows 系统上。 + +最彻底的解决办法是使用 Linux 作为服务器的操作系统(但请不要使用宝塔之类的面板软件),这不仅能解决这个问题,还可以避免其它只会出现在 Windows 中的问题。 + +临时的解决办法是修改 MySQL 的配置文件。打开 `my.ini` 文件,在 `[mysqld]` 下面加两行: + +```ini +innodb_large_prefix=ON +innodb_file_format=Barracuda +``` + +保存并重新启动 MySQL。 \ No newline at end of file