1

Very new to mySQL and databases in general. I don't understand what files I will need to transfer to my website after creating a schema in mySQL Workbench. I read that tables are stored as frm files but after creating my first schema and a table within it, I can't locate a frm file anywhere, only a mwb file. Do I need to export them, and is frm the file type I would use to put the schema on my web server? Thank you for helping me understand these very basic concepts.

1 Answers1

0

The .frm file is an internal MySQL file. The type of file you want to create with workbench is a .sql file.

Evert
  • 93,428
  • 18
  • 118
  • 189
  • 1
    Using the same MySQL database versions most likely also simply support copy and paste internal database files like .frm (table's format), myd (MyISAM data) myi (MyISAM indexes) and .ibd (InnoDB data file).. But you right normally you would and should use .sql files for maximal compatibility between MySQL versions – Raymond Nijland Sep 30 '18 at 16:09
  • Yea, usually they are forward compatible, but .sql files are meant to be portable. – Evert Sep 30 '18 at 16:11
  • "but .sql files are meant to be portable" That is a bit questionsable because every DMBS has it own SQL implementation on top of the ANSI SQL standards. If the SQL file only contains only ANSI SQL standards statements then the SQL file is portable in mine opinion. – Raymond Nijland Sep 30 '18 at 16:16
  • @RaymondNijland I meant in the context of MySQL, which was what the question was about. – Evert Sep 30 '18 at 16:23
  • "I meant in the context of MySQL" Between a lower and higher (upgrading) MySQL version then yes a .SQL file is portable.. Between a higher and lower (downgrading) MySQL version a .SQL file is not always portable unless the exporter exports conditional comments ( like `/*!50110` (MySQL 5.1.10+) ) which only runs on the correct MySQL version. – Raymond Nijland Sep 30 '18 at 16:33
  • @RaymondNijland Is that really important in the context of this question? What are you hoping to convince me or OP of? – Evert Sep 30 '18 at 16:39
  • Not trying to convince annybody.. The comments are more meant to inform the future readers they should know the right context and or information isn't that what Stackoverflow is about? – Raymond Nijland Sep 30 '18 at 16:53
  • Thank you for your help everyone. I appreciate you taking the time. – Bret.burrill Sep 30 '18 at 17:48
  • 1
    @RaymondNijland it feels more like wanting to be the most correct, but if that was not the intent then thanks for the contribution. – Evert Sep 30 '18 at 18:36
  • no the comments was not meant to be the most correct i just wanted to give the best information (contribution) as possible. – Raymond Nijland Sep 30 '18 at 19:59