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

Unable to create database #449

Open
Rory-Sullivan opened this issue Jun 13, 2022 · 3 comments
Open

Unable to create database #449

Rory-Sullivan opened this issue Jun 13, 2022 · 3 comments

Comments

@Rory-Sullivan
Copy link

I am having issues running Roundhouse against a new install of MySQL server (8.0.29). Roundhouse fails to create a new database on the server, full error message below.

This SO post suggests upgrading the MySQL connector dependency, https://stackoverflow.com/questions/68645324/system-notsupportedexception-character-set-utf8mb3-is-not-supported-by-net-f

Error message:
roundhouse.databases.mysql.MySqlDatabase with provider MySql.Data.MySqlClient does not provide a facility for creating a database at this time.
System.NotSupportedException: Character set 'utf8mb3' is not supported by .Net Framework.
at MySql.Data.MySqlClient.CharSetMap.GetCharacterSet(DBVersion version, String charSetName)
at MySql.Data.MySqlClient.MySqlField.SetFieldEncoding()
at MySql.Data.MySqlClient.MySqlField.set_CharacterSetIndex(Int32 value)
at MySql.Data.MySqlClient.NativeDriver.GetColumnData(MySqlField field)
at MySql.Data.MySqlClient.NativeDriver.GetColumnsData(MySqlField[] columns)
at MySql.Data.MySqlClient.Driver.GetColumns(Int32 count)
at MySql.Data.MySqlClient.ResultSet.LoadColumns(Int32 numCols)
at MySql.Data.MySqlClient.ResultSet..ctor(Driver d, Int32 statementId, Int32 numCols)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlDataReader.Close()
at MySql.Data.MySqlClient.MySqlCommand.ResetReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.Driver.ReportWarnings(MySqlConnection connection)
at MySql.Data.MySqlClient.Driver.CloseQuery(MySqlConnection connection, Int32 statementId)
at MySql.Data.MySqlClient.MySqlCommand.Close(MySqlDataReader reader)
at MySql.Data.MySqlClient.MySqlDataReader.Close()
at MySql.Data.MySqlClient.MySqlDataReader.Dispose(Boolean disposing)
at MySql.Data.MySqlClient.MySqlDataReader.Dispose()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
at roundhouse.databases.AdoNetDatabase.<>c__DisplayClass15_0.<run_sql_scalar>b__0() in C:\projects\roundhouse\product\roundhouse.core\databases\AdoNetDatabase.cs:line 160
at Polly.Policy.<>c__DisplayClass114_01.<Execute>b__0(Context ctx, CancellationToken ct) at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Action4 onRetry, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider)
at Polly.Retry.RetryPolicy.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken) at Polly.Policy.Execute[TResult](Func3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute[TResult](Func1 action) at roundhouse.databases.AdoNetDatabase.run_sql_scalar(String sql_to_run, ConnectionType connection_type, IList1 parameters) in C:\projects\roundhouse\product\roundhouse.core\databases\AdoNetDatabase.cs:line 160
at roundhouse.databases.DefaultDatabase1.run_sql_scalar(String sql_to_run, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse.core\databases\DefaultDatabase.cs:line 219 at roundhouse.databases.DefaultDatabase1.run_sql_scalar_boolean(String sql_to_run, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse.core\databases\DefaultDatabase.cs:line 138
at roundhouse.databases.DefaultDatabase`1.create_database_if_it_doesnt_exist(String custom_create_database_script) in C:\projects\roundhouse\product\roundhouse.core\databases\DefaultDatabase.cs:line 122

@Rory-Sullivan
Copy link
Author

Update: downgrading the MySQL Server version solved the issue. In our case we went back to 8.0.26.

@erikbra
Copy link
Member

erikbra commented Jun 16, 2022

Hi, @Rory-Sullivan , maybe this is not relevant to you, but as a tip, due to the many ancient-ish dependencies in RoundhousE, I gave up maintaining it about a year back, and made a re-implementation from scratch, called grate. More info on the decision/process can be found here: #438 (comment)

Please feel free to check out grate, as it is been more actively developed, and is beginning to get a bit of traction from other contributors as well.

@Rory-Sullivan
Copy link
Author

Hi @erikbra, I am aware of grate and we have previously tried to move from Roundhouse to grate but I remember running into some issues at that time. However I will explore this option again as it has been a while since so this may have changed. I will let you know how this goes.

Thanks!

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