Hi Experts and Developers,
I am just starting out on using MySQL and dbExpress in Delphi. Since I have been developing Database applications using BDE in Delphi I have always kept my database [tables] in a subdirectory of my application directory.
My question is: Is it possible to still use the same layout for my new projects using MySQL or does MySQL impose a restriction on the location of the database. I have noted there is a data subdirectory in MySQL home directory that houses all databases. I would still wish to keep my databases in my project directory outside MySQL!
Comments
: Hi Experts and Developers,
:
: I am just starting out on using MySQL and dbExpress in Delphi. Since I have been developing Database applications using BDE in Delphi I have always kept my database [tables] in a subdirectory of my application directory.
:
: My question is: Is it possible to still use the same layout for my new projects using MySQL or does MySQL impose a restriction on the location of the database. I have noted there is a data subdirectory in MySQL home directory that houses all databases. I would still wish to keep my databases in my project directory outside MySQL!
:
This website might help: http://dev.mysql.com/doc/refman/5.0/en/windows-create-option-file.html
I found it using the search terms: "mysql "data directory"" in google.
Thanks a lot for the prompt reply. Am reading it right now.
I read the article but still I haven't been satisfied with the proposed solution. All databases are still kept under the MySQL data directory while I would like to specify the path to my database that is outside the normal data directory under MySQL. My data directory will be under my project directory for example: C:CodeBaseHotelManData. Is it possible for me to access a database using dbExpress and Mysql that is located outside MySQL?
:
: I read the article but still I haven't been satisfied with the proposed solution. All databases are still kept under the MySQL data directory while I would like to specify the path to my database that is outside the normal data directory under MySQL. My data directory will be under my project directory for example: C:CodeBaseHotelManData. Is it possible for me to access a database using dbExpress and Mysql that is located outside MySQL?
:
In the option file place this line:
[code]
# set datadir to the location of your data directory
datadir=C:CodeBaseHotelManData
[/code]
as described in the article.
Or you could create a batch file, which launches your MySQL server with the --datadir option (also in the article).
As far as I can tell from reading the article this will tell MySQL to look for the data in the specified directory.
My point is that different projects will have their databases in different locations! These different locations may be scattered on the drive(filesystem) and not necessarily under a single parent directory.
:
: My point is that different projects will have their databases in different locations! These different locations may be scattered on the drive(filesystem) and not necessarily under a single parent directory.
:
This is beyond my knowledge. Perhaps you have more success on the MySQL messageboard, because it is not really a Delphi problem as more a MySQL problem.
Thanks a lot. I'll try my luck.