码迷,mamicode.com
首页 > 数据库 > 详细

UniDAC连接Embedded MySQL server

时间:2014-07-03 20:01:47      阅读:919      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   strong   width   os   

Simple question about MySQL embedded application.

 

Simple question about MySQL embedded application.

bubuko.com,布布扣by tanghz » Mon 11 Oct 2010 23:29

Hi , 
I am wondering how I can use the embedded MySQL server in a Delphi application via UniDAC? Do you have a demo for this ? Better give me a step by step guide if possible. 
Thanks very much.
tanghz
 
Posts: 16
Joined: Wed 17 Jan 2007 02:40

 

bubuko.com,布布扣by AndreyZ » Tue 12 Oct 2010 08:05

Hello, 

You can look at the MyDACDemo->TechnologySpecific->Embedded demo. This demo demonstrates working with Embedded MySQL Server. If you don‘t have MyDAC you can download MyDAC Trial version. Also you can read the Using Embedded Server topic in MyDAC Reference Manual.
AndreyZ
Devart Team
 
Posts: 2506
Joined: Fri 03 Sep 2010 07:16

 

bubuko.com,布布扣by tanghz » Tue 12 Oct 2010 16:26

Hi , I purchased UniDAC. Will you include that embedded part of function in this product? This is a standard feature of MySQL, I presume.
tanghz
 
Posts: 16
Joined: Wed 17 Jan 2007 02:40

 

bubuko.com,布布扣by AndreyZ » Wed 13 Oct 2010 08:10

UniDACDemo doesn‘t have the example of working with Embedded MySQL Server. That‘s why you can look at this example only in MyDACDemo. 

You can connect to the Embedded MySQL server with UniDAC in the following way:
Code: Select all
  UniConnection.ProviderName := ‘MySQL‘; 
  UniConnection.Database := DatabaseName; 
  UniConnection.SpecificOptions.Values[‘Embedded‘] := ‘True‘; 
  UniConnection.SpecificOptions.Values[‘EmbeddedParams‘] := ‘--basedir=.‘#13#10‘--datadir=data‘;

The --basedir parameter sets the base path for the Embedded MySQL server. All paths are usually used relatively to the base path. The --datadir parameter sets the path to the data directory.
Last edited by AndreyZ on Wed 13 Oct 2010 11:07, edited 1 time in total.
AndreyZ
Devart Team
 
Posts: 2506
Joined: Fri 03 Sep 2010 07:16

 

bubuko.com,布布扣by tanghz » Wed 13 Oct 2010 10:11

great, this is a special offer. 
I will try it and feed back to you. 
Very well thought, UniDAC!
tanghz
 
Posts: 16
Joined: Wed 17 Jan 2007 02:40

Re: Simple question about MySQL embedded application.

bubuko.com,布布扣by vallemanden » Wed 19 Sep 2012 11:49

I tryed this but i keep getting error about can‘t load libmysql.dll, but it is in the same dir where the exe fil is

using firemonkey 
mysql 5.5
unidac 4.5.9

"MySQL client library couldn‘t be loaded. Please place libmysqld.dll file to system folder (included to PATH) or to the folder with executable unit of main program."
vallemanden
 
Posts: 17
Joined: Sat 11 Jun 2011 07:44

Re: Simple question about MySQL embedded application.

bubuko.com,布布扣by AndreyZ » Wed 19 Sep 2012 14:28

Please make sure you placed the libmysqld.dll (and not libmysql.dll) library to the directory where the executable file of your application is located. Also, please note that you should use 32-bit libmysqld.dll for 32-bit applications, and 64-bit libmysqld.dll for 64-bit applications.

 

 

 

http://www.cnblogs.com/wxb-km/archive/2012/11/21/2781719.html

UniDAC连接Embedded MySQL server,布布扣,bubuko.com

UniDAC连接Embedded MySQL server

标签:style   blog   http   strong   width   os   

原文地址:http://www.cnblogs.com/findumars/p/3821195.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!