Delphi and Kylix

Moderators: pritaeas
Number of threads: 7264
Number of posts: 19073

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
MySQL Posted by martbase on 6 Dec 2005 at 3:11 AM
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!
Report
Re: MySQL Posted by zibadian on 6 Dec 2005 at 4:09 AM
This message was edited by zibadian at 2005-12-6 4:10:48

: 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.


Report
MySQL: "mysql "data directory"" Posted by martbase on 7 Dec 2005 at 9:39 AM
Hi,

Thanks a lot for the prompt reply. Am reading it right now.
Report
MySQL Database path Posted by martbase on 7 Dec 2005 at 9:52 AM
Hi,

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:\CodeBase\HotelMan\Data. Is it possible for me to access a database using dbExpress and Mysql that is located outside MySQL?
Report
Re: MySQL Database path Posted by zibadian on 8 Dec 2005 at 12:36 AM
: Hi,
:
: 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:\CodeBase\HotelMan\Data. 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:
# set datadir to the location of your data directory
datadir=C:\CodeBase\HotelMan\Data

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.
Report
MySQL Database path Posted by martbase on 8 Dec 2005 at 2:58 AM
Hi,

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.
Report
Re: MySQL Database path Posted by zibadian on 9 Dec 2005 at 2:45 AM
: Hi,
:
: 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.
Report
MySQL Database path Posted by martbase on 9 Dec 2005 at 9:08 AM
Hi,

Thanks a lot. I'll try my luck.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.