• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Tools DB

Messages
1,043
Country
us-northcarolina
Hello,

Does anyone know where the MySql data files are stored, I can't find them?
Thanks,

Patrick
 
I'll guess you are using Windows.
If you are using wamp, it's under wamp\bin\mysql\mysql<version>\data

If not using wamp should be under C:\ProgramData\MySQL\MySQL Server <version>\data
You can check the location in my.ini file. The storage is a mix of frm (table definitions), myd (myisam files) and myi (actual data) files.
 
Last edited:
No 'my.ini' file in my installation folder nor in my AppData\Roaming folder. Where can it be found?
 
Let's try this. Hit Start, then type services.msc in the search box and open it. Find mysql service and right click on it. Open properties. Find a string "path to executable" and somewhere in it you should find the defaults-file part which stores the path to your mysql configuration file. Find the file and inside find the datadir.

Or maybe an easier way, just search for my.ini or frm, myd or myi files.
 
Great, using the 1st method you mentioned I finally found the data files.
So how do you distribute a DB? I suppose you have to distribute all those files? That is so messy compared to SQL server files, yuk! I can't imagine distributing a DB with 100's of tables :)

You said, "The storage is a mix of frm (table definitions), myd (myisam files) and myi (actual data) files."
I only get the frm (still associated to VB5 in screenshot).

Untitled-1.jpg
 
The best way of distributing a mysql database is to export it into a sql file.

To create a dump of the databse simply use the following command in the Command Prompt
Code:
mysqldump -u user-p database>backup.sql

To import the sql file to another database use
Code:
mysql -u user-p database<backup.sql

Once you type either of these two commands you will be asked to input password for the mysql user you typed.

mysqldump.exe and mysql.exe are located in wherever you installed the mysql server. Of course you can change the exported file name from backup.sql to whatever.
 
Thank you so much for your help, you seem to be an expert in MySql administration.
I suppose to distribute a DB with a .NET program I would have to include the MySql runtime files in a distribution package, which at the moment I have no idea how. The question is, would the runtime be able to use the dump as a DB? It would be out of the question to have the user install the full version of MySql then make them import the dump.
 
Mysql is run as a service on host computer, so no way to distribute them without installing the whole server package. I suggest you to take a look at sqllite. Basically you will have entire database in one file, protected with encryption that you distribute with your software.
 
Yeah I looked at SqlLite, couldn't even figure out what file to download and install. Also it's a command line program and by what I read all available interfaces are pretty crappy. That's too bad because the format seems great.
 
Do you actually need a sql database?
 
Hi Jon,

I'm not set on any kind of DB, I guess even ACCESS would do the trick, well not sure since it's a pain to safely retrieve the ID after an insert.

I'm rewriting in VB.NET a program I created in VB5 years ago. Since I don't care for my AI to follow real timetable and I don't want to spend hours creating flight plans, selecting times and destinations, etc. so I created that tool that generates flight plans automatically and randomly based on selections (aircraft, %day/night, IFR/VFR, etc.) and realistic parameters (time on ground, altitude following FAA rules, etc.) It can create complete FP in 5-10 minutes.

In my conversion I'm using LINQ to Entities to manipulate the data. In the original, available airports and aircraft were stored in text files. I thought it would be more elegant and efficient to have the data in a DB. I still could use text files though, load them in a class then query the class. I just don't like it though, it's not neat and I would have to load the whole x1000's airport in memory.

Any input appreciated,
Patrick
 
There are a number of 'embedded' databases available for NET applications. I don't really use them ADE loads all airport data into memory from a text type file - maybe not elegant but it works fine in a dictionary or even a list. However I did look at several embedded object databases which are simple to use. You are familiar with Stack Overflow I think and also a search on embedded NET databases will turn up loads of stuff. I looked at emedded object databases such as Velocity. I prefer object based databases that don't enforce the need for fixed length fields, tables and so on.
 
Thanks for the tips John, I'll look all that up. I see you are going the way of NoSQL DB, very nice, it seems to be the future in many cases.
I could always use a List (Of clsAirport) and LINQ query on that object but depending on how many regions are used that can be a big load of data.
On the other end installing a new DB, learning it, researching, etc. phew, that doesn't excite me.
 
Last edited:
MyISAM will work without importing/exporting the database files. Including a portable instance of MySQL server with your software would work, but I advise against it.
Do go the way of SQLite or similar.
 
Thanks for the advice Peter. It seems indeed that SQLite is the way to go but 1st I'll have to figure out which version to install, and that in itself is a small nightmare.
 
Time for me to develop and integrate a DB so I did some reading and I'll go for sQLlite. However I just spent some time on the download page and can't figure out what to download to save my life. Is it the "sqlite-amalgamation-3080704.zip" file that I'll have to compile? Don't they have a precompiled version of it? Or is it that their classes have to be added to each VS project?

Any help on that would be a life saver,
Thanks
 
Back
Top