XOJO MariaDB working versions

Hello, @XOJO, is there anyone that could point a documentation or an official document where it states the functional versions of xojo for each version of MariaDB ? apparently there are a lot of issues connecting to MariaDB on linux servers on the latest public XOJO version .

I see on the tracker feature requests to replace MySQL with MariaDB 8 years ago, so sad

Thanks.

What issues?

if you look for an alternative, you can use MBS Xojo SQL Plugin, which suppers both MySQL and MariaDB in all the versions from past 10 years.

You may need recent connector libraries and we have a few versions here.

it simply does not connect, i have it on a Debian 11, and MariaDB 10.8, and running it from MacOS works smooth, running that from Debien does not work, and seeing the trackers on XOJO bugs William said ā€œFixed on MacOS, Windows but not on Linuxā€ so i assume there is my issue

Any other code that i run connects without any issues, but not any xojo app.

i simply get Server error : Access denied for user ā€˜userā€™@ā€˜127.0.0.1ā€™ (using password: YES) but never get such error for same code but on MacOS running ssh Tunnel , so Password is ok, code is ok OS seems to be. the problem or at least the running part on Linux

try localhost instead of the IP.

The IP may not be allowed, but localhost is the loopback interface and normally connected through a socket in /tmp.

Changing to localhost gives this ā€œServer error : Canā€™t connect to local MySQL server through socket ā€˜/tmp/mysql.sockā€™ (2)ā€

Wellā€¦ XojoCloud uses MariaDB so it canā€™t be completely broken.

IIRC, it was 127.0.0.1 on Xojo cloud as well.

Is your user actually named ā€œuserā€ in the database though?

well user is out of the question, apparently there is something between the servers , on the socket part i fix it by adding

[client]

socket = /run/mysqld/mysqld.sock

to 50-client.cnf
then doing a ln -s /run/mysqld/mysqld.sock /tmp/mysql.sock and that fixed the issue locally, however it seems that under no circumstances does not want to work via tunnel from the other Debian machine . It does work from MacOS so that is the weird part . Both servers are identical and have same dependencies

You donā€™t have MariaDB and MySQL running on that server, right?

nope , just MariaDB and it was just updated to 10.11.4 on server 1 and just mariadb client on server 2 from where i want to reach to server 1

and to get more weird here , i do use the tunnel from shell side to test the servers access , initiate the tunnel , use the connection string

mysql -u fsStats --port 3307 -h 127.0.0.1

and iā€™m in , so remote server using Tunnel works via shell side, however , doing that from XOJO, does not work, i keep on getting

ERROR 1045 (28000): Access denied for user ā€˜fsStatsā€™@ā€˜127.0.0.1ā€™ (using password: YES)

and from shell side both are valid,

localhost and 127.0.0.1

Could you show your Xojo connection code?

mDB = New MySQLCommunityServer

mDB.Host = "localhost"
mDB.UserName = fsUN
mDB.Password = fsUP
mDB.DatabaseName = dbn
mDB.Port = 3307

Try
  'connectFS
  
  'If tunnelDidOpen Then
  mDB.Connect
  stdout.WriteLine("connected")
  mDBStat = True
  
  'End If
  
Catch e As DatabaseException
  stdout.WriteLine("Server error : " + e.Message)
  
  mDBStat = False
  
End Try

port is for the tunnel and all the rest are standard

Host is changing as i try localhost and 127.0.0.1

Could you clarify that?

for testing purposes i said that

mDB.Host = "localhost"

or could be

mDB.Host = "127.0.0.1"

This is not a connection issue. It is an authentication issue. Focus on this part.

Well thatā€™s the funny and confusing part, as same username and password works on any other code, it does work locally now on the server which has Mariadb installed but it does not work when called via tunnel or via remote. So how that could be an authentication issue ? is it related to XOJO ? as any other code just works , including XOJO on local

The combination of user@origin must be allowed, if peter@123.1.1.1 gets access, it does not mean that peter@127.0.0.1 will, if some restriction is set.

Read servers docs about the subject tracking the issue.

https://dev.mysql.com/doc/refman/8.0/en/connection-access.html

iā€™m not sure i get it, as said same user ,
same connection works on shell,
works on xojo when app runs locally,
works on shell when run over the tunnel,
does not work on xojo when run via tunnel on the second debian server,
but it does work on MacOS via tunnel same code same connection parameters

so Yes fsStat@127.0.0.1 does work on any steps i enumerated earlier, except on the app when the app is on the second debian server which should allow same functionality .

why not ? what is the purpose of the Tunnel ? as for what i know is forwarding and mapping the original port to a new port and mapping it as local, so same functionality should be applied

Connect to the db, and type

SHOW GRANTS FOR 'fsStat@localhost';
SHOW GRANTS FOR 'fsStat@127.0.0.1';

Investigate all possibilities of local connection and authorizations.

SHOW CREATE USER 'fsStat@localhost';
SHOW CREATE USER 'fsStat@127.0.0.1';