简体   繁体   English

MySQL“识别存储引擎声明”

[英]MySQL “ identify storage engine statement”

This IS NOT a Homework question! 这不是作业问题! While building my current student database project I realized that I may want to identify comprehensive information about a database design in the future. 在构建当前的学生数据库项目时,我意识到我将来可能希望识别有关数据库设计的全面信息。 More-so if I am fortunate enough to get a job in this field and were handed a database project how could I break down certain elements for identification... 更是如此-如果我很幸运能够在这一领域找到一份工作并被交给数据库项目,我该如何分解某些元素以进行识别...

In all of my previous designs I have been using MySQL Community Server (GPL) 5.1.42, I thought (duh) that I was using the MyISAM based on most of my text-book instruction and MySQL 5.0 Reference Manual :: 13 Storage Engines :: 13.1 The MyISAM Storage Engine 在我以前的所有设计中,我一直在使用MySQL Community Server(GPL)5.1.42,我以为我基于大多数教科书和《 MySQL 5.0参考手册》 :: 13 Storage Engines使用MyISAM。 :: 13.1 MyISAM存储引擎

I determined that this was in fact incorrect for this version and the use of "SHOW ENGINES" at the console... No problem, figured out why they have "versions" the need to pay attention to what version is being used, and the need for a means to determine what I am about to mess up "if" I do not pay attention to detail... 我确定这实际上对于该版本是不正确的,并且在控制台上使用了“ SHOW ENGINES”……没问题,弄清楚了为什么他们有“版本”,需要注意所使用的版本,以及需要一种方法来确定我要弄乱的“如果”,我不注意细节...

Q1. Q1。 Specifically what statement will identify the version used by someone elses initial database creation? 具体说来,什么语句将标识其他人最初创建数据库时使用的版本? (since I created my own databases I know what version I used) (因为我创建了自己的数据库,所以知道使用的版本)

Q2. Q2。 Specifically what statement will identify the storage engine that the developer used when creating the database. 具体来说,哪种语句将标识开发人员在创建数据库时使用的存储引擎。 (I specified a particular database in my collection then tried SHOW Engine, did not work, then tried to just get the metadata from one table in that database: (我在集合中指定了一个特定的数据库,然后尝试使用SHOW Engine,但没有用,然后尝试仅从该数据库的一个表中获取元数据:

mysql> SELECT duck_cust, table_type, engine -> FROM INFORMATION_SCHEMA.tables -> WHERE table_schema = 'tp' -> ORDER BY table_type ASC, table_name DESC; mysql> SELECT duck_cust,table_type,engine-> FROM INFORMATION_SCHEMA.tables-> WHERE table_schema ='tp'-> ORDER BY table_type ASC,table_name DESC;

as this was not really what I wanted (and did not work) I am looking for some direction from the pros... 因为这不是我真正想要的(并且没有用),所以我正在寻找专业人士的指导...

Q3. Q3。 (If you really have the inclination to continue helping) If I were to access a database from an earlier/later "version" are there backward/forward compatibility issues for maintaining/updating data between versions? (如果您确实有意继续提供帮助)如果我要从较早/较晚的“版本”访问数据库,是否存在在版本之间维护/更新数据的向后/向前兼容性问题? Please and Thank you in advance for your time and efforts! 请并预先感谢您的时间和努力! sammysmall sammysmall

This worked fine when I tested it: 当我测试它时,它工作正常:

SELECT table_name, table_type, engine, version FROM INFORMATION_SCHEMA.tables  
WHERE table_schema = 'tp' ORDER BY table_type ASC, table_name DESC;

I don't know what duck_cust means in your example query. 我不知道在您的示例查询中duck_cust是什么意思。 That's not a column in INFORMATION_SCHEMA.tables , so that is certain to make your query give an error. 那不是INFORMATION_SCHEMA.tables的一列,因此可以肯定会使您的查询出错。

I've had very little trouble with MySQL upgrading from one version to the next. 我将MySQL从一个版本升级到另一个版本几乎没有什么麻烦。 But I still make a database backup before upgrading the software, just to be safe. 但是为了安全起见,我仍然在升级软件之前进行数据库备份。

You should be in the habit of making backups regularly anyway . 无论如何,您应该养成定期进行备份的习惯

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

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