Recent

Author Topic: Connect to Mysql  (Read 12533 times)

Nokao

  • New Member
  • *
  • Posts: 34
Connect to Mysql
« on: December 14, 2006, 04:43:32 pm »
On an article i read that lazarus still don't support mysql connection, that's intend as VISUAL mysql components or there is no way to to connect to mysql?

Or the article was old? ;)

If it's possible can you give me some links on how?

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: Connect to Mysql
« Reply #1 on: December 14, 2006, 04:54:47 pm »
Did you have a look at the wiki? This is a very good ;) tutorial.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #2 on: December 14, 2006, 05:19:37 pm »
Thank you, i was just looking at the lazarus wiki, there is a really huge documentation of a lot of things.

Really a "step ahead" compared to delphi's documentation.

Good demostration of the potentiality of free software.

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #3 on: December 18, 2006, 01:20:19 pm »
Hi, i'm following the guide but i'm getting this error:
C:\apps\lazarus\components\sqldb\registersqldb.pas(33,3) Fatal: Can't find unit mysql40conn

Like if the component is not correctly installed or linked...

Another problem is that if, from lazarus, i set the connection i'm creating to active, i get the error:
could not load the library "libmysql.dll". Please check your installation

Can someone help?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Connect to Mysql
« Reply #4 on: December 18, 2006, 03:23:34 pm »
Do you have libmysql.dll on your computer? Is it in a directory that is in the PATH environment variable?

Do you have a mysql40conn.ppu on your computer?

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #5 on: December 18, 2006, 04:00:53 pm »
I just installed php5 but i still have the problem, where i can find that dll? Where i have to put it to make it work?

About the LAZARUS problem (the first i showed) i think i'm in a big problem... the sqldblaz.ppu don't exist, compiled for the ARK that i'm compiling with (WinCE-ARM).

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Connect to Mysql
« Reply #6 on: December 18, 2006, 04:05:11 pm »
You have the download the dll from mysql. But I don't know if MYSQL has client libs for arm-wince.

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #7 on: December 18, 2006, 04:06:45 pm »
But the client libs should be for win32, cause i'm only cross-compiling for wince but i get that error using lazarus on my WindowsXP (win32) client.

Am I wrong?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Connect to Mysql
« Reply #8 on: December 18, 2006, 04:09:09 pm »
No, if you want to use mysql on arm-wince, you need to use the client libs for arm-wince.

If you want to run the application on windows xp, then you can use the win32 client libs.

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #9 on: December 18, 2006, 04:24:55 pm »
Are you sure...? I get the same error with lazarus on win32 compiling...

I'm talking about:
Inside lazarus
Trying to connect to a mysqldb using it's components
Getting an error

Nothing about wince in that i'm doing... (in that second problem)

Wince is mentioned in the first problem...

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Connect to Mysql
« Reply #10 on: December 18, 2006, 04:27:50 pm »
OK. Let's tackle win32 first.

Where did you install the libmysql.dll?

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #11 on: December 18, 2006, 04:29:40 pm »
There is that file in 3 places, all in:

C:\mysql\

Now where do i have to set the paths inside lazarus?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Connect to Mysql
« Reply #12 on: December 18, 2006, 04:34:05 pm »
Add c:\mysql to the PATH environment variable. Or copy the dll to a directory already in the PATH envrionment variable, like c:\windows\system32.

Nokao

  • New Member
  • *
  • Posts: 34
RE: Connect to Mysql
« Reply #13 on: December 18, 2006, 04:40:00 pm »
Ok now it give me a version error, i'm providing to download 4.1 mysql client libs myself. Thanks for the help.

But for the first, harder, problem? I'm fucked didn't I?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: RE: Connect to Mysql
« Reply #14 on: December 18, 2006, 04:50:24 pm »
Quote from: "Nokao"
But for the first, harder, problem? I'm fucked didn't I?

Using the component on arm-wince? I don't know. Fixing compilation is probably easy. But I doubt it is useful, if there are no client libs from MySql. You need to find out that for yourself first. Then we can change the fpc distribution, if necessary.

 

TinyPortal © 2005-2018