Error 1045 in Xojo 2025r2

I have an error DatabaseException when i run my code in Xojo 2025r2

But it’s fine in Xojo 2025r1.1

My connection code is

backoffice = New MySQLCommunityServer
backoffice.Host=“localhost”
backoffice.port=3306
backoffice.databaseName=“mydb”
backoffice.UserName=“root”
backoffice.Password=“pasword”

Try
backoffice.Connect
Catch error As DatabaseException
MessageBox("Connection failed. Error: " + error.Message)
Quit
End Try

According to my search error 1045 is access denied, usually when the username/password is not allowed.

Not sure about the difference between your screenshot and code (user ODBC vs root for example).

1 Like

That’s weird from the Xojo perspective, as he is setting all the values, but… if he was using a mysql.exe tool without an user specified (like mysql.exe -u root), the mysql.exe assumes -u ODBC in Windows.

More importantly, why didn’t the exception handler catch it

5 Likes

My code run smoothly in Xojo 2025r1.1 but after trying run in Xojo 2025r2 it’s show databaseexception error

Update to Xojo 2025r2

same in my Android project with encrypted sqlite

You need to contact Xojo.
If you can create a sample project that works on 2025r1.1 but not with 2025r2 will be best.
You can contact support by email.
I see you create an Issue:
#79521 - Error 1045 Xojo 2025r2
but is missing some basic information like:

  • Is the project for Desktop?
  • Are you running on Windows, Mac, Linux?
  • A sample project that helps reproduce the problem

I hope they can fix your problem soon.

#79518 - Xojo 2025r2 Android file is not a database, encrypted sqlite

Can you add a sample project to your report?