Jump to content

Does any MySQL related UDF support the MySQL 8.0+


Go to solution Solved by ajag,

Recommended Posts

Posted (edited)

Hi there, I used MySQL UDF for MySQL connection and work normally on MySQL 5.x series

but MySQL server update to 8.0.36 recently and UDF I used seems not support, even I replaced the libmysql.dll which copied from MySQL installation folder

and I tried to use the MySQL related UDF from Wiki Collection (  EzMySql, MySQL (without ODBC) ... etc. ) still not supported 8.0+ either

does any MySQL related UDF support MySQL 8.0+ without ODBC driver ? ( work station without ODBC driver )

thanks

Edited by jimmy123j
Link to comment
Share on other sites

  • Solution
Posted (edited)

Hi Jimmi123j, 

we recently switched to MySQL 8.0.34. (from 5.5.15 🙄)

We use the UDF from ProgAndy (https://www.autoitscript.com/forum/index.php?showtopic=85617)

To make it work you have to
 

  • use libmysql.dll  from MySQL 5.7 (last 32bit Version of libmysql.dll)
  • build your script as 32bit (not 64bit!)
     

A-Jay

Edited by ajag

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Link to comment
Share on other sites

Posted (edited)

Hi ajag, thanks for reply and share, I'll try it

could you mind to share the MySQL UDF bundle you used, 'cause links from ProgAndy topic not work anymore or garbled characters

I'll be grateful

btw, does workable condition you shared work on SciTE.exe script run ? 

  • use libmysql.dll  from MySQL 5.7 (last 32bit Version of libmysql.dll)
  • build your script as 32bit (not 64bit!)

thanks again

Edited by jimmy123j
Link to comment
Share on other sites

  • jimmy123j changed the title to Does any MySQL related UDF support the MySQL 8.0+
I sent you a message.

Yes, it will run in SciTE, why not?

/A-Jay

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Link to comment
Share on other sites

  • 2 weeks later...
Posted (edited)

Hi A-jay,

as talked, it's work on MySQL 8.0+ now ( I tried on MySQL 8.0.38 )

I think the reason is UDF not support MySQL 8.0+  libmysql.dll and old 5.0 libmysql.dll not support 8.0+

so the other UDF might work with last MySQL 5 libmysql.dll not just ProgAndy UDF

I bundled the ProgAndy UDF shared from A-jay and last MySQL 5 (ver 5.7.44) libmysql.dll which copied from MySQL ver 5.7.44 Offical Installer

MySQL.zip hope can help you guys and here is sample script I tried

#include <Array.au3>
#include "MySQL\mysql.au3"

Global $libmysql_Path = "libmysql.dll Path"
Global $MySQL_Inital, $MySQL_Connection, $MySQL_Script, $MySQL_Result, $MySQL_RowCnt, $MySQL_ColCnt, $MySQL_ResultArray
Global $MySQL_error

; ====

_MySQL_InitLibrary( $libmysql_Path )

If @error Then Exit MsgBox(0, "", "Inital MySQL Fail")

ConsoleWrite("MySQL version : " & _MySQL_Get_Client_Info() & @CRLF & "DLL version : " & _MySQL_Get_Client_Version() & @CRLF )

; ====

$MySQL_Inital = _MySQL_Init()

$MySQL_Connection = _MySQL_Real_Connect($MySQL_Inital, "localhost", "root", "Password", "", "3306")

If $MySQL_Connection = 0 Then Exit MsgBox(0, "Connection Fail", _MySQL_Error($MySQL_Inital))

; ====

$MySQL_Script = "select * from DB.Table"

; ==

$MySQL_Result = _MySQL_Real_Query($MySQL_Connection, $MySQL_Script)

If $MySQL_Result = $MYSQL_SUCCESS Then
   ConsoleWrite("Query Success" & @CRLF)
Else
   $MySQL_error = _MySQL_errno($MySQL_Connection)
   ConsoleWrite("Error : " & $MySQL_error & ", " & _MySQL_error($MySQL_Connection) & @CRLF)
EndIf

; ====

$MySQL_Result = _MySQL_Store_Result($MySQL_Connection)

$MySQL_ColCnt = _MySQL_Num_Fields($MySQL_Result)
$MySQL_RowCnt = _MySQL_Num_Rows($MySQL_Result)

ConsoleWrite("Result : " & $MySQL_RowCnt & " x " & $MySQL_ColCnt & @CRLF)

; ====

$MySQL_ResultArray = _MySQL_Fetch_Result_StringArray($MySQL_Result)

_ArrayDisplay($MySQL_ResultArray)

; ====

_MySQL_Free_Result($MySQL_Result)

; ==

_MySQL_Close($MySQL_Connection)
_MySQL_EndLibrary()

image.thumb.png.68840d4cc24e50d5c183b459a098a353.png

 

Edited by jimmy123j
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...