mysql5.5 lazarus / 16-Databases ---------------------------------------------------------------------- jack616 · 2012-05-04 12:12 Hi Can someone tell me what I need to download to get lazarus/fpc to work with mysql5.5 please? (Ideally with relevant link) thanks ---------------------------------------------------------------------- BigChimp · 2012-05-04 13:33 Yes. Search for mysql 5.5 in the little search box to the left here... Answers have been given before ---------------------------------------------------------------------- jack616 · 2012-05-06 12:34 For anyone reading this there is a library at: http://zeos.firmos.at/ This is supposed to work - I'm about to try it. (See how easy it is to give a helpful response ?) ---------------------------------------------------------------------- BigChimp · 2012-05-06 13:04 @jack, I know I could have spelt things out. However, if I were to do that for every guy posting the same kind of question on the forums, I both wouldn't have time left and get completely demotivated because I'd have to repeat myself. Is it that hard to research a bit before asking questions? Even an indication that you tried and failed to find info helps a lot in motivating people to give an answer. OTTOMH, Mysql 5.5 support was fairly recently added to FPC's native sqldb, probably also to Lazarus (saw a recent bug on the bugtracker re mysql 5.5 support in Lazarus). Edit: no not yet added to Lazarus; you could try and patch it, see: http://bugs.freepascal.org/view.php?id=21507 Anyway, thanks for posting the link to zeos.. hope it works. Good luck, BigChimp ---------------------------------------------------------------------- marcov · 2012-05-06 14:38 mysql 5.5  connection was merged to 2.6.1 about two weeks ago. Of course the usual disclaimers apply, one shouldn't probably be using mysql in the first place. ---------------------------------------------------------------------- jack616 · 2012-05-07 15:08 Thanks everyone - For info the Zeos libraries for this dont work under win7-64 As I cant use SVN can someone tell me if there is a way to upgrade from 2.6.0 to 2.6.1 for win7-64 to include the mysql55 component or patch please? I've tried downloading the dev zips but cant work out what I need to do with them - can I just extract them into the existing tree and recompile lazarus? I dont mind downloading another full implementation if thats what I need to do (I'm starting from scratch with lazarus anyway) but I cant see one available yet. I dont mind hand patching if someone can tell me what and where. thanks ps everybody should use mysql on pain of death by tickling ---------------------------------------------------------------------- Lacak2 · 2012-05-09 05:44 Quote from: jack616 on May 07, 2012, 05:08:03 pmAs I cant use SVN can someone tell me if there is a way to upgrade from 2.6.0 to 2.6.1 for win7-64 to include the mysql55 component or patch please? ftp://freepascal.dfmk.hu/pub/lazarus/snapshots/ ---------------------------------------------------------------------- jack616 · 2012-05-09 11:16 Many thanks Lacak2 - I didnt know the 2.7 chain was downloadable. That should solve my problem. I'm downloading now. ---------------------------------------------------------------------- jack616 · 2012-05-09 11:40 Nope - doesnt work. I did a clean install of lazarus - pointed the fpc.exe at the 64 bit one included as the install errored but it then ran. Opening mySQL with the 5.1 component (which is the latest mentioned that is said works with 5.5) generated the "expected(5.1) got (5.5.9) " error message. Am I doing something wrong or is the 5.5 support not installed in 2.7 yet? ---------------------------------------------------------------------- BigChimp · 2012-05-09 12:27 The snapshots should be based on FPC 2.6.1, not FPC 2.7... Are your mysql dlls 32 or 64 bit? (Are there even any 64 bit mysql dlls?) You need to align your DLL bitness with your compiler/executable bitness case, i.e. use 32 bit compiler if you have a 32 bit DLL... This will probably apply to the Zeos components, too. Try downloading the x86/32 bit Lazarus + FPC 2.6.1 snapshot instead of the x64 version. ---------------------------------------------------------------------- marcov · 2012-05-09 12:47 Quote from: jack616 on May 09, 2012, 01:40:19 pm Opening mySQL with the 5.1 component (which is the latest mentioned that is said works with 5.5) generated the "expected(5.1) got (5.5.9) " error message. Am I doing something wrong or is the 5.5 support not installed in 2.7 yet? You are still using the 5.1 connection component. Use the (new) 5.5 connection component. ---------------------------------------------------------------------- jack616 · 2012-05-09 15:49 Thanks all - it seems the download page is being added to - I originally looked for 2.6.1 but it wasnt there - it is now so I'll go get it. marcov - the 5.5 component isnt in 2.7 or i'd have used that. I tried the 5.1 because the bug report pages said that was being modded to work with 5.5 at some point. I have double checked all the other stuff. (Its a different message if you try to use 32 bit anyway as it just cant find the library at all). (obviously) Anyway I'll try the 2.6.1 and see how I get on. ---------------------------------------------------------------------- BigChimp · 2012-05-09 16:09 Yes it is in Lazarus trunk + FPC 2.7 (trunk)....see screenshot (think it's today's Lazarus+FPC). I've never seen a snapshot with FPC 2.7 so I think you may have been mistaken in some way unless you downloaded/compiled it via SVN. ---------------------------------------------------------------------- jack616 · 2012-05-09 16:13 OK now we're cooking. 2.6.1 has the mysql5.5 component and setting connection true no longer generates an error. So now I go away and learn to use it. Thanks again to everyone that helped. PS. BigChimp - maybe I just missed it somehow - anyway - all up and apparently running now. ---------------------------------------------------------------------- BigChimp · 2012-05-09 16:20 No worries, glad you got it going ---------------------------------------------------------------------- tkramer3 · 2012-07-06 05:15 I found a different solution for use with Kubuntu 12.04. Download the deb package libmysqlclient16 from http://packages.ubuntu.com/search?keywords=libmysqlclient16 I used the 11.10 - AMD64 version, the latest before 12.04. This is the version with which the Lazarus 5.1 component works. Install the package. I didn't get any dependency problems. then link /usr/lib/mysqlclient.so with: # cd /usr/lib # ln -s libmysqlclient.so.16.0.0 libmysqlclient.so Now you can connect to 5.5 databases with the 5.1 component.