Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to connect to mysql DB but DB exist and wotks fine #3043

Open
jpVm5jYYRE1VIKL opened this issue Oct 18, 2024 · 2 comments
Open

Fail to connect to mysql DB but DB exist and wotks fine #3043

jpVm5jYYRE1VIKL opened this issue Oct 18, 2024 · 2 comments

Comments

@jpVm5jYYRE1VIKL
Copy link

<!-- Please provide the information requested below -->

TerrariaAPI Version: 2.1.0.0 (Protocol v1.4.4.9 (279), OTAPI 1.4.4.9)

[TShock] Info Config path has been set to /terraria/config

[TShock] Info Log path has been set to /terraria/logs

TShock was improperly shut down. Please use the exit command in the future to prevent this.

TShock encountered a problem from which it cannot recover. The following message may help diagnose the problem.

Until the problem is resolved, TShock will not be able to start (and will crash on startup).

System.Exception: Fatal TShock initialization exception: failed to connect to MySQL database. See inner exception for details.

 ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.

   at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)

   at MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection)

   at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection)

   at MySql.Data.MySqlClient.MySqlConnection.Open()

   at TShockAPI.DB.DbExt.QueryReader(IDbConnection olddb, String query, Object[] args) in /home/runner/work/TShock/TShock/TShockAPI/Extensions/DbExt.cs:line 67

   --- End of inner exception stack trace ---

   at TShockAPI.DB.DbExt.QueryReader(IDbConnection olddb, String query, Object[] args) in /home/runner/work/TShock/TShock/TShockAPI/Extensions/DbExt.cs:line 79

   at TShockAPI.DB.SqlTableCreator.GetColumns(SqlTable table) in /home/runner/work/TShock/TShock/TShockAPI/DB/SqlTable.cs:line 90

   at TShockAPI.DB.SqlTableCreator.EnsureTableStructure(SqlTable table) in /home/runner/work/TShock/TShock/TShockAPI/DB/SqlTable.cs:line 58

   at TShockAPI.DB.BanManager..ctor(IDbConnection db) in /home/runner/work/TShock/TShock/TShockAPI/DB/BanManager.cs:line 77

   at TShockAPI.TShock.Initialize() in /home/runner/work/TShock/TShock/TShockAPI/TShock.cs:line 369

Created new 8401x2401 DefaultCollection`1 for source: System.Void Terraria.Main::.cctor()



@sgkoishi
Copy link
Contributor

MySQL 8.x? Somehow remember reports about broken 8.x

@jpVm5jYYRE1VIKL
Copy link
Author

Hi
Nope . I using Mariadb . In previous bersions of tshock which is mono based everything worked good. After upgrade to core based not work anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants