Recent

Author Topic: How to install ZeosDBO  (Read 19115 times)

Rayson

  • New Member
  • *
  • Posts: 10
How to install ZeosDBO
« on: October 27, 2010, 05:01:00 am »
Can someone tell me how to install ZeosDBO in 64 bit Ubuntu running Lazarus 0.9.28 please? I want to connect up to my MySQL 5.1 db.

I have read http://wiki.lazarus.freepascal.org/ZeosDBO but cannot figure out how to get the components into Lazarus.

Ray

bobo

  • Full Member
  • ***
  • Posts: 171
Re: How to install ZeosDBO
« Reply #1 on: October 27, 2010, 05:15:58 am »
1. Start up your Lazarus
2. Menu -> Package -> Open Package File (.lpk)
select
zeos/packages/lazarus/zcomponent.lpk

3. Let Lazarus rebuild itself. Voila! You have the zeos components on your toolbar.

Rayson

  • New Member
  • *
  • Posts: 10
Re: How to install ZeosDBO
« Reply #2 on: October 27, 2010, 03:54:08 pm »
Great Thanks! Now I have the Zeos Access tab and components.

Unfortunately when I select  ZConnection1 and fill in Database, HostName, Password, and User, then try to set the Connected to True, I get a Requested database driver was not found.

This is a bit strange as I was able to at least get the TMYSQL50Connection to register True when I filled in db information and attempted to set the Connected to True.

What could be the problem now? This is a Ubuntu Version 10.04 64 bit machine with MySQL 5.1 installed.

Ray

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: How to install ZeosDBO
« Reply #3 on: October 27, 2010, 07:03:55 pm »
exploreit :D

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12572
  • FPC developer.
Re: How to install ZeosDBO
« Reply #4 on: October 27, 2010, 07:13:46 pm »
Great Thanks! Now I have the Zeos Access tab and components.

Unfortunately when I select  ZConnection1 and fill in Database, HostName, Password, and User, then try to set the Connected to True, I get a Requested database driver was not found.

This is a bit strange as I was able to at least get the TMYSQL50Connection to register True when I filled in db information and attempted to set the Connected to True.

What could be the problem now? This is a Ubuntu Version 10.04 64 bit machine with MySQL 5.1 installed.

Ray

5.0 <> 5.1, they use different filenames. For trivial stuff they seem to be compatible enough, but it takes trickery (e.g. a symlink from libmysqlclient.so.16 to libmysqlclient.so.15

Mysql versioning is a mess (on purpose probably, to keep some motivation for the commercial licenses)

Rayson

  • New Member
  • *
  • Posts: 10
Re: How to install ZeosDBO
« Reply #5 on: October 27, 2010, 10:37:17 pm »
Thanks but I am still getting Requested database driver was not found.

I executed the following in /usr/lib64 >> sudo ln -s libmysqlclient.so.16.0.0 libmysqlclient.so.15

Now when I do a grep it get:
Quote
libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
libmysqlclient_r.so.16.0.0
libmysqlclient.so -> libmysqlclient.so.16.0.0
libmysqlclient.so.15 -> libmysqlclient.so.16.0.0
libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
libmysqlclient.so.16.0.0

Did I do the sym link backward or something? Any more suggestions?

Ray

jaggerdan

  • New Member
  • *
  • Posts: 14
Re: How to install ZeosDBO
« Reply #6 on: October 28, 2010, 02:12:37 am »
You also have to select the 'format' also.  Unfortunately, with zeoslib there is no selection for mysql 5.1.   There is however, a ton of others to choose from.  Like you, i am at a loss as to what to do now.  At this point in time, there is no viable solution out there that I am capable of doing with my limited skills.  Ubuntu, lazarus and mysql 5.1 do not mix easily.  Dan

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12572
  • FPC developer.
Re: How to install ZeosDBO
« Reply #7 on: October 28, 2010, 10:29:01 am »
It is possible to add versions without recompiling zeos: (from zeos forum)

I think so. Zeos uses the same mechanism to workaround mysql versioning.

You need to define a small driver class for a new version (16 is Mysql 5.1, 15 is mysql 5.0).

See the source of ZPlainMySqlDriver how to it. These drivers must be somehow get connected to the connection, probably via similar classes as in zdbc/zdbcmysql.pas
I think so. Zeos uses the same mechanism to workaround mysql versioning. You need to define a small driver class for a new version (16 is Mysql 5.1, 15 is mysql 5.0). See the source of ZPlainMySqlDriver how to it. These drivers must be somehow get connected to the connection, probably via similar classes as in zdbc/zdbcmysql.pasI think so. Zeos uses the same mechanism to workaround mysql versioning. You need to define a small driver class for a new version (16 is Mysql 5.1, 15 is mysql 5.0). See the source of ZPlainMySqlDriver how to it. These drivers must be somehow get connected to the connection, probably via similar classes as in zdbc/zdbcmysql.pas
      Switch to full edit form


I'm a zeos but postgres user, so I don't know these details that well.

w135n03

  • Newbie
  • Posts: 6
Re: How to install ZeosDBO
« Reply #8 on: October 28, 2010, 11:35:43 am »
try to select one of the selection protocol.
Sorry for my English

Rayson

  • New Member
  • *
  • Posts: 10
Re: How to install ZeosDBO
« Reply #9 on: October 29, 2010, 01:04:08 am »
Thanks, I have given up on ZeosDBO for now.

ray

99Percent

  • Full Member
  • ***
  • Posts: 160
Re: How to install ZeosDBO
« Reply #10 on: October 29, 2010, 01:59:34 am »
If you can, avoid MySQL and use PostgreSQL instead.

jaggerdan

  • New Member
  • *
  • Posts: 14
Re: How to install ZeosDBO
« Reply #11 on: October 30, 2010, 02:28:27 pm »
There HAS to be a way to easily connect to mysql 5.1 %)  Check this out  http://bugs.freepascal.org/view.php?id=17406    Michael Van Canneyt (administrator)  has something here but I can't get it to work.  He uses the standard sqldb components instead of zeoslib.  Maybe someone with more experience with FPC can post details on how to do it.

 

TinyPortal © 2005-2018