[Gambas-user] MySql Reconnect warning

Gianluigi gradobag at gradobag.it
Fri Aug 18 14:32:50 CEST 2023


Il 18/08/23 13:40, Benoît Minisini ha scritto:
> Le 18/08/2023 à 12:24, Gianluigi a écrit :
>> Hi Benoit,
>>
>> I don't know MySQL, nevertheless I create a MySQL database with the 
>> ORMs made available by Gambas.
>> '----------------
>> With $hConn
>>      .Close()
>>      .Type = "mysql"
>>      .Host = "localhost"
>>      .Login = "login"
>>      .Password = "password"
>>      .Port = "3306"
>>      .Name = ""
>>      .Open
>>      If Not .Databases.Exist($sNameDB) Then
>>        .Databases.Add("databasename")
>>        .Close
>>        .Name = "databasename"
>>        .Open
>>        .Begin
>>        MakeTable
>>        FillTable
>>        .Commit
>>        Print ("#Database successfully created!")
>>        Print ("Database is open = "); .Opened
>>      Endif
>> End With
>> '----------------
>> In console I get this notice:
>>
>> WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a 
>> future version.
>> WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a 
>> future version.
>> #Database successfully created!
>> Database is open = True
>>
>> Can I avoid it, am I doing something wrong?
>>
>> Best regards
>>
>> Gianluigi
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
> Can you try the latest commit? Automatic reconnection is not set 
> anymore when MySQL version is greater or equal than 8.0.34.
>
> Regards,
>
It works very well, you are great!

Thank you very much

Best regards

Gianluigi



More information about the User mailing list