# Error 1045 in Xojo 2025r2

**URL:** <https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885>\
**Category:** Databases\
**Created:** [July 10, 2025, 1:22am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885 "2025-07-10T01:22:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dede\_Gardea](https://forum.xojo.com/user_avatar/forum.xojo.com/dede_gardea/32/1040_2.png) [@Dede\_Gardea](https://forum.xojo.com/u/Dede_Gardea)\
**Post date:** [July 10, 2025, 1:22am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/1 "2025-07-10T01:22:16Z")

</div>

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

 ![error1045](https://forum.xojo.com/uploads/default/original/3X/8/6/86a1493917be970dc51e3baae829c4c64315cf6b.jpeg)

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

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [July 10, 2025, 2:28am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/2 "2025-07-10T02:28:04Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 10, 2025, 2:55am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/3 "2025-07-10T02:55:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [July 10, 2025, 2:55am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/4 "2025-07-10T02:55:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dede\_Gardea](https://forum.xojo.com/user_avatar/forum.xojo.com/dede_gardea/32/1040_2.png) [@Dede\_Gardea](https://forum.xojo.com/u/Dede_Gardea)\
**Post date:** [July 10, 2025, 5:42am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/5 "2025-07-10T05:42:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [July 10, 2025, 6:51am UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/6 "2025-07-10T06:51:21Z")

</div>

> Update to Xojo 2025r2

same in my Android project with encrypted sqlite

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [July 10, 2025, 12:56pm UTC](https://forum.xojo.com/t/error-1045-in-xojo-2025r2/85885/7 "2025-07-10T12:56:08Z")

</div>

> [@Dede\_Gardea](#):
>
> My code run smoothly in Xojo 2025r1.1 but after trying run in Xojo 2025r2

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](https://tracker.xojo.com/xojoinc/xojo/-/issues/79521)  
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.

> [@MarkusR](#):
>
> same in my Android project

[#79518 - Xojo 2025r2 Android file is not a database, encrypted sqlite](https://tracker.xojo.com/xojoinc/xojo/-/issues/79518)

Can you add a sample project to your report?
