Recent

Author Topic: Working with MySQL 8.0  (Read 5263 times)

svtdoug

  • Newbie
  • Posts: 3
Working with MySQL 8.0
« on: November 15, 2021, 04:26:48 am »
Hey, after installing Lazarus, I am up and running.  I love the IDE, has all that was nice about Delphi IDE before it got harder to use.  I really like the classic un-docked desktop. 

I am trying to connect to a MySQL server which is running 8.0.  I tried using the supplied mySQL components - the latest being MySQL57Connection.  Weill, not suprising I get a version mismatch error when trying to connect.  So what is the work around for this?  I suspect Zeos components is one avenue.  Are there other native components I have not found?  Maybe I should try TSQLConnector?  Checked that out and the highest it goes is MySQL 5.7 also. 

Thanks for any clues.

Doug

Zvoni

  • Hero Member
  • *****
  • Posts: 2330
Re: Working with MySQL 8.0
« Reply #1 on: November 15, 2021, 08:26:00 am »
Which FPC/Laz-Version?
Support for MySQL80 has been added for FPC3.2.2
https://wiki.freepascal.org/FPC_New_Features_3.2.2
« Last Edit: November 15, 2021, 08:51:16 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

svtdoug

  • Newbie
  • Posts: 3
Re: Working with MySQL 8.0
« Reply #2 on: November 22, 2021, 04:41:40 am »
Thanks for suggestion.  I am using Lazarus IDE v2.2.0RC2.  I was able to install FPC3.2.2 and found the MyQSL80Connection component.  But using that component along with SQLQuery and Datasource with DBGrid - still not able to with my MySQL DB.  In design time, with the MySQL80Connection I can set Connected to True (no errors) but when I set the SQLQuery to active, I get an error "Unable to open file "mytestdb";  the system cannot find the file specified." 

The file is there, check the name dozens of times.  This is same arrangement which is working in Delphi 10.4.2 with either FireDAC or Zeos components. 

I really want to get away from Embarcadaro! 

Thanks for any hints.
Doug


// Edit // 
Never mind.  I figured it out.  Have to use a QSLTransaction component between the SQLQuery and Connection.   That's different than Delphi with Zeos...   learning!

Doug

« Last Edit: November 22, 2021, 05:23:13 am by svtdoug »

miab3

  • Full Member
  • ***
  • Posts: 145
Re: Working with MySQL 8.0
« Reply #3 on: November 22, 2021, 11:10:38 am »
Why didn't you use Zeos?

Michał

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: Working with MySQL 8.0
« Reply #4 on: November 23, 2021, 05:28:38 pm »
From his comments, he knows how to use ZEOS. But I guess he need to learn about  the online package manager and about compiling IDE?
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

 

TinyPortal © 2005-2018