Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

MySQL

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

  • zibadianzibadian Posts: 6,349Member
    [b][red]This message was edited by zibadian at 2005-12-6 4:10:48[/red][/b][hr]
    : 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.


  • martbasemartbase Posts: 49Member
    Hi,

    Thanks a lot for the prompt reply. Am reading it right now.
  • martbasemartbase Posts: 49Member
    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:CodeBaseHotelManData. Is it possible for me to access a database using dbExpress and Mysql that is located outside MySQL?
  • zibadianzibadian Posts: 6,349Member
    : 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: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.
  • martbasemartbase Posts: 49Member
    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.
  • zibadianzibadian Posts: 6,349Member
    : 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.
  • martbasemartbase Posts: 49Member
    Hi,

    Thanks a lot. I'll try my luck.
Sign In or Register to comment.