Simple question about MySQL embedded application.

 
7 posts • Page 1 of 1
 

Simple question about MySQL embedded application.

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

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

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

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

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.

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.

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的更多相关文章

  1. 使用sqlyog连接ubuntu mysql server错误解决方案

    现在很多服务都部署在linux环境中,但是在开发阶段,使用windows远程连接工具,直观,这对开发人员更友好. 下面是我在ubuntu16.04使用mysql- server时,遇到了一下的问题,以 ...

  2. Delphi FireMonkey使用UniDAC 连接MySQL

    首次用Delphi XE6 开发安卓程序,并没有在网上找到连接远程MySQL服务器的文档,自己摸索一番,发现UniDAC控件新版本也已支持了FireMonkey下的开发.遂记下连接方法和大家分享. 1 ...

  3. mySql 远程连接(is not allowed to connect to this MySQL server)

    如果你想连接你的mysql的时候发生这个错误: ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL serve ...

  4. 连接Mysql提示Can’t connect to local MySQL server through socket的解决方法

    mysql,mysqldump,Mysqladmin,php连接mysql服务常会提示下面错误: ERROR 2002 (HY000): Can't connect to local MySQL se ...

  5. MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

    最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...

  6. ruby使用DBI连接MySQL数据库发生异常:in `error': Can't connect to MySQL server on 'localhost' (10061) (DBI::DatabaseError)

    Ruby使用DBI连接MySQL数据库一般为: require "dbi" dbh = DBI.connect("dbi:Mysql:test:localhost&quo ...

  7. 远程连接mysql报错【1130 -host 'localhost' is not allowed to connect to this mysql server】

    远程连接mysql时包如下错误: 1130 -host 'localhost' is not allowed to connect to this mysql server 解决办法 本地用root账 ...

  8. Mysql连接错误:Lost connection to Mysql server at 'waiting for initial communication packet'

    在远程连接mysql的时候,连接不上,出现如下报错:Lost connection to MySQL server at 'waiting for initial communication pack ...

  9. mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法

    安装完MySQL后,远程连接数据库的时候,出现 ERROR 1130 (HY000): Host '192.168.0.1' is not allowed to connect to this MyS ...

随机推荐

  1. js正则表达式,只允许输入纯数字或‘/’

    //输入框,限数字和/----需要多个数量询价,请以/分隔 function onlyonce(obj) {//先把非数字的都替换掉,除了数字和.obj.value = obj.value.repla ...

  2. vue 自定义指令使用

    <template> <div> <!-- 让input元素在打开页面的时候就获得焦点 --> <input type="text" v- ...

  3. 笔试算法题(12):整数的string到int转换 & 两个栈实现队列

    出题:将输入的表示整数的字符串转变为对应的整数值: 分析: 每当右边增加一位,说明之前的sum应该高一个数量级,所以*10.由于这两个实现仅仅考虑正规的.正整数输入,所以需要一个Wrapper函数,其 ...

  4. 解决mysql时区问题以及SSL问题

    看了下网上的教程,觉得都太麻烦啦,这里推荐个简单的! 解决时区问题 只需要加上serverTimezone=UTC即可,如下: spring.datasource.url=jdbc:mysql://1 ...

  5. SpringBoot 全局处理以及注入请求参数

    后端接口,经常会用token获取对应的账号信息.于是考虑将这个步骤封装起来. 之前项目使用ThreadLocal去做这样的事情,但昨天看SpringBoot的官方文档,发现借助框架的功能也可以做这样的 ...

  6. js 技巧 (一)

      · 事件源对象 event.srcElement.tagName event.srcElement.type · 捕获释放event.srcElement.setCapture();  event ...

  7. Python之面向对象封装

    Python之面向对象封装 封装不是单纯意义的隐藏 什么是封装: 将数据放在一个设定好的盒子里,并标出数据可以实现的功能,将功能按钮外露,而隐藏其功能的工作原理,就是封装. 要怎么封装: 你余额宝有多 ...

  8. The Bells are Ringing(枚举)

    Description Perhaps you all have heard the mythical story about Tower of Hanoi (The details of this ...

  9. Thawte 企业版代码签名证书

      Thawte企业版代码签名证书 ,严格验证企业身份,如果您是个人开放者,请申请Thawte 个人代码签名证书.Thawte企业代码签名证书 可帮助程序开发者使用微软代码签名工具(Microsoft ...

  10. Qt笔记——各种组件和其他细碎用法

    LineEdit 获取文本:ui->usrLineEdit->text() 清空内容:ui->pwdLineEdit->clear(); 定位光标:ui->usrLine ...