[Gambas-user] MySql Reconnect warning

Benoît Minisini benoit.minisini at gambas-basic.org
Fri Aug 18 13:40:40 CEST 2023


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,

-- 
Benoît Minisini.



More information about the User mailing list