简体   繁体   English

MySQL共享主机:db是MyISAM,尽管所有创建的表都是InnoDB。 我可以换吗? 我是不是该?

[英]MySQL shared hosting: db is MyISAM, although all created tables are InnoDB. Can I switch? Should I?

My question is about the Type of db that is on a shared hosting Linux server. 我的问题是关于共享主机Linux服务器上的db类型。 phpMyAdmin shows that db has MyISAM Type. phpMyAdmin显示db具有MyISAM类型。 I don't think I can change it. 我认为我不能改变它。 I mean I don't know. 我的意思是我不知道。 All tables in that db have InnoDB type. 该数据库中的所有表都具有InnoDB类型。 Does it make sense to change db type to InnoDB? 将db类型更改为InnoDB是否有意义? Should I? 我是不是该? (I don't know if I can choose a db type on a shared hosting server). (我不知道我是否可以在共享托管服务器上选择数据库类型)。 Of course I can contact a customer support and ask them to switch if they can, but I don't know if it makes any sense and has any pros. 当然,我可以联系客户支持并要求他们切换,如果他们可以,但我不知道它是否有任何意义,并有任何专业人士。

Should I take care of it? 我应该好好照顾吗?

Thank you 谢谢 在此输入图像描述 . Added: The image above is a screenshot from phpMyAdmin. 补充:上面的图片是phpMyAdmin的截图。

You might misunderstanding, database does not have a storage engine . 您可能会误解,数据库没有存储引擎
The storage engine is meant for table. 存储引擎适用于表。
You can only switch the storage engine for tables. 您只能切换表的存储引擎。

However, myisam does not support transactional, 但是,myisam不支持事务性,
and innodb (mysql version <5.6) does not support full-text search. 和innodb(mysql版本<5.6)不支持全文搜索。

Without knowing which tables in which database, 不知道哪个表在哪个数据库中,
my guess is you should not change the storage engine. 我的猜测是你不应该改变存储引擎。

Example :- 示例: -

http://demo.phpmyadmin.net/STABLE/index.php?lang=en&collation_connection=utf8_general_ci http://demo.phpmyadmin.net/STABLE/index.php?lang=en&collat​​ion_connection=utf8_general_ci

The bottom row showing in phpmyadmin is the equivalent of :- 在phpmyadmin中显示的底行相当于: -

show create database YOUR_DATABASE;

when you create new table without specify a storage engine, 在未指定存储引擎的情况下创建新表时
the default storage engine type on the database will apply to it. 数据库上的默认存储引擎类型将应用于它。

for mysql version 5.5, default storage engine is change to innodb. 对于mysql 5.5版,默认存储引擎更改为innodb。

there is no direct way to change database default storage engine after you have create a database 创建数据库后,没有直接的方法来更改数据库默认存储引擎

the workaround is create a new database with you desired default storage engine, 解决方法是使用您所需的默认存储引擎创建一个新数据库,
then rename all the tables currently reside in the existing database to this database. 然后将当前驻留在现有数据库中的所有表重命名为此数据库。

This is the default storage engine of the server. 这是服务器的默认存储引擎。 If you do not specify a storage engine when creating a table then the server picks MyISAM as the default 如果在创建表时未指定存储引擎,则服务器会选择MyISAM作为默认值

For example on my server InnoDB is the default. 例如,在我的服务器上,InnoDB是默认设置。

mysql> show engines\G
*************************** 1. row ***************************
      Engine: InnoDB
     Support: DEFAULT
     Comment: Supports transactions, row-level locking, and foreign keys
Transactions: YES
          XA: YES
  Savepoints: YES

Also in answer to your second question. 也回答你的第二个问题。 Yes you can change the storage engine. 是的,您可以更改存储引擎。 You can do this with the ALTER TABLE command. 您可以使用ALTER TABLE命令执行此操作。

ALTER TABLE mytable ENGINE=MYISAM;

I suggest not to change storage engines unless you have a specific need for a feature in an engine. 我建议不要更改存储引擎,除非您特别需要引擎中的功能。

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

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