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中的同步异步问题

    <script> /* * JS 是单线程 * 同步 异步 * 常见的异步 * 1.定时器 * 2.事件绑定 * 3.ajax请求(一般的都是异步) * 4.回调函数也可以理解成 异步 * ...

  2. vue跨域解决方法 及设置api路径方法

    vue项目中,前端与后台进行数据请求或者提交的时候,如果后台没有设置跨域,前端本地调试代码的时候就会报“No 'Access-Control-Allow-Origin' header is prese ...

  3. group by两个条件

    学生表: 成绩表: 问题:统计各系各门课程的平均成绩 答案: select sdept,cno,AVG(grade)avg_grade from S join SC on S.sno = SC.sno ...

  4. mysql jdbc驱动与java 版本对应关系

    当使用某些密码套件时,Connector/J5.1需要JRE 1.8.x才能使用SSL/TLS连接到MySQL 5.6,5.7和8.0.

  5. MySQL的优化细节

    数据库设计 目的 结合DBMS(数据库管理系统)实现有效存储.高效访问.减少数据冗余,避免维护异常,节约存储空间. 大概的步骤 需求分析->逻辑设计->物理设计(考虑数据库系统的差异)-& ...

  6. db2事务日志已满解决办法

    查看事务日志配置(MICRO_11为数据库名称): db2 get db cfg for MICRO_11 运行结果: 日志文件大小(4KB)                         (LOG ...

  7. UE4 插件扩展引擎工具栏

    UE4 作为游戏引擎,已经提供了非常强大的游戏开发的API.作为游戏制作者来讲,我们需要一些专用的功能辅助我们更好的开发游戏,而不是仅仅从构建游戏逻辑出发.因此也就有了扩展编辑器功能的这个想法,还好 ...

  8. Leetcode 139.单词拆分

    单词拆分 给定一个非空字符串 s 和一个包含非空单词列表的字典 wordDict,判定 s 是否可以被空格拆分为一个或多个在字典中出现的单词. 说明: 拆分时可以重复使用字典中的单词. 你可以假设字典 ...

  9. 【转】Java的path,classpath,java_home环境变量的配置与具体含义

    对于一个Java初学者来说,第一步要做的是安装jdk并配置环境变量,一般按照书上或者网上的步骤,一步步照着做就行了,但是对于初学者来说,很多问题没有解决,比如为什么很多配置方法各不相同,却都能够配置成 ...

  10. HDU 1525 Euclid Game

    题目大意: 给定2个数a , b,假定b>=a总是从b中取走一个a的整数倍,也就是让 b-k*a(k*a<=b) 每人执行一步这个操作,最后得到0的人胜利结束游戏 (0,a)是一个终止态P ...