jimmy123j Posted July 6, 2024 Posted July 6, 2024 (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 July 10, 2024 by jimmy123j
Solution ajag Posted July 9, 2024 Solution Posted July 9, 2024 (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 July 9, 2024 by ajag Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1)
jimmy123j Posted July 10, 2024 Author Posted July 10, 2024 (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 July 10, 2024 by jimmy123j
ajag Posted July 11, 2024 Posted July 11, 2024 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)
jimmy123j Posted July 21, 2024 Author Posted July 21, 2024 (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 expandcollapse popup#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() Edited July 21, 2024 by jimmy123j
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now