Ever since the upgrade to the newer web servers, I haven't been able to get my asp.net pages to save data to my MySQL database. They all get the error: ERROR [HY000] [MySQL][ODBC 5.2(w) Driver][mysqld-4.1.18-standard]Server does not support 4-byte encoded UTF8 characters.; myodbc5w.dll; at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteNonQuery() Is there a setting I'm missing or do I need to connect using something other than ODBC?
I was able to located this web page article regarding the error message here: http://stackoverflow.com/questions/...es-not-support-4-byte-encoded-utf8-characters According to that article they stated: "If you need MySQL to support 4-byte UTF-8 characters (which is normally considered part of UTF-8), you need to use the character set utf8mb4, not utf8. utf8mb4 was first supported in MySQL 5.5.3."
I found that page as well, but unfortunately I'm not trying to use any special characters. The same exact code worked before the migration so I'm guessing it's an issue with the ODBC driver. I've searched on the discountasp.net site for info on what drivers are available but couldn't find much. I did find an old post mentioning "mySQL .NET connector". Has anyone used that? Does anyone know what version Discountasp.net has on the servers?
We have a knowledge base article that states what versions we support here: https://support.discountasp.net/KB/a359/how-to-query-a-mysql-database-in-asp.aspx For IIS 8 servers you need to use: MySQL ODBC 5.2w Driver For IIS 7 servers you need to use: MySQL ODBC 5.1 Driver
Right, that's the one reference I found which is why I'm using the 5.2w driver (as found in the error message above). Do the IIS 8 servers support anything else such as MySQL .net connector? I cannot seem to get the issue above resolved with the 5.2w driver. The same code worked on the old server with old ODBC driver; all I changed was the connection string after the migration.
If your site is on our IIS 7 server you should use MySQL ODBC 5.1 Driver Is your site on our IIS 8 server? What version of MySQL database are you using by the way? Do you know if you're using the newer version or MySQL version 4? As for the MySQL .net Connector, you can upload the dll file into the bin directory and you will be able to use it for your application: http://stackoverflow.com/questions/3877006/where-can-i-find-mysql-data-dll-for-c-sharp
My site is on the IIS 8 server. According to MySQL Administrator, the database server is running 4.1.18.
You should consider first creating a backup of your current MySQL database using the MySQL Administrator and than go ahead and create a new MySQL database through our control panel and restore the MySQL database onto the new MySQL database. This will provide you with the latest version of the MySQL database we support. The problem might be coming from your older MySQL database you're currently using.
Thanks for the suggestion! I was wondering how I can upgrade the database with my account. Looks like between the MySQL .net Connector and upgrading the database I have two possible approaches.
Depending on how much MySQL disk space you have free. You should be able to create a new MySQL database in the control panel here: https://my.discountasp.net/mysql.aspx Once you create the MySQL database our system will automatically create the MySQL database on the higher version. With MySQL Administrator you will need to create the backup of your older MySQL database. This should create a .sql file I believe. With MySQL Administrator, go ahead and connect to the new MySQL database and restore that .sql file onto the new MySQL database. Note: You must use MySQL Administrator to backup your older MySQL database because it doesn't work with MySQL Workbench.