简体   繁体   English

更改MySQL innodb_file_format和large_prefix是否会对其他网站造成任何问题?

[英]Will changing MySQL innodb_file_format and large_prefix cause any issues for other websites?

Explanation: 说明:

Trying to install Moodle and the installation process says I need to make the following changes in MySQL config (for full unicode support): 尝试安装Moodle ,安装过程表明我需要在MySQL配置中进行以下更改(以获得完整的unicode支持):

SET GLOBAL innodb_file_format = barracuda

SET GLOBAL innodb_large_prefix = 'on'

SET GLOBAL innodb_file_per_table = 1

This is a shared hosting with cPanel, every other requirement is set/installed. 这是与cPanel共享的主机,其他所有要求都已设置/安装。

Question: 题:

There are many other websites on this server using MySQL with the old settings and my question is if I run the commands above and change innodb_file_format to "Barracuda" (currently it is Antelope) and innodb_large_prefix to "on" will this cause any possible issues for other websites? 此服务器上还有许多其他网站使用旧设置的MySQL,我的问题是,如果我运行上述命令,并将innodb_file_format to "Barracuda"更改innodb_file_format to "Barracuda" (当前为Antelope),并将innodb_large_prefix to "on"这将导致任何可能的问题其他网站?

If yes, how do I avoid them? 如果是,我如何避免它们? can I set this setting for a single database only? 只能为单个数据库设置此设置吗?

These changes have no effect until you recreate the tables. 在重新创建表之前,这些更改无效。 Only new tables pick up the changes. 只有新表才能接受更改。 You don't have to explicitly drop the tables though. 您不必显式删除表。 IIRC a ALTER TABLE foo FORCE; IIRC ALTER TABLE foo FORCE; also does the job. 也可以做。 This might take a while, though. 不过,这可能需要一段时间。 If you don't want to have a downtime, you can use pt-online-schema-change for example (from the percona-tools). 如果您不想停机,可以使用pt-online-schema-change作为示例(来自percona-tools)。

Whatever is reading from or writing to your database tables, doesn't care at all about these changes. 不管从数据库表中读取或写入数据库表,都根本不需要关心这些更改。

No, you can not set these settings for a single database only. 不,您不能仅为单个数据库设置这些设置。 It's for all databases on your server. 适用于服务器上的所有数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM