I have MariaDB installed and working on my PC. I found if I tried to just connect when running the program in the IDE, it works. I get a connection value. I can then create a database and use it. But if I compile it to a stand-alone exe, then run the exe from either a command window or File Explorer, it returns 0 and does not connect. The parameters are correct.
Code: Select all
; UsePostgreSQLDatabase()
UseMySQLDatabase()
Define connection
; connection=OpenDatabase(#PB_Any,"host=DEANS port=5432","postgres","postgres",#PB_Database_PostgreSQL) ;this works compiled
connection=OpenDatabase(#PB_Any,"host=DEANS port=3306 dbname=mysql","root","mariadb",#PB_Database_MySQL) ;this does not work compiles
MessageRequester("Database",Str(connection))
End
I also have Postgresql installed and tried that. It connects correctly when compiled.
I am baffled. Anyone have an idea why the MariaDB connection returns 0 when compiled?