How to connect to external data server on MySQL using .NET?
Hi,
I want to separate my database to be in a separate data server. Below is the current connection string on my local database (it's a working one).
<add name="MySqlConn" connectionString="Database=kudodb;Data Source=localhost;User Id=root;Password=root;charset=utf8" providerName="System.Data.MySql"/>
I'd tried on below and it's not working (xxx.xx.xx.xx = data server ip address).
<add name="MySqlConn" connectionString="Database=kudodb;Data Source=xxx.xx.xx.xx,3306;User Id=root;Password=root;charset=utf8" providerName="System.Data.MySql"/>
Any idea? Do i need to set permission also on the MySQL database?
ASP.NETMySQL Server
Last Comment
Umesh
8/22/2022 - Mon
tangteng78
ASKER
And i get the error message below on the connection string below:
<add name="MySqlConn" connectionString="Database=kudodb;Data Source=xxx.xx.xx.xx; Port =3306;User Id=root;Password=root;charset=utf8" providerName="System.Data.MySql"/>
============
Error Message:
============
Access denied for user 'root'@'pgxpletang.abc.com' (using password: YES) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: MySql.Data.MySqlClient.MySqlException: Access denied for user 'root'@'pgxpletang.abc.com' (using password: YES)
Umesh
Error simply states that password supplied for user root is not matching with that of stored in grant tables...
<add name="MySqlConn" connectionString="Database
============
Error Message:
============
Access denied for user 'root'@'pgxpletang.abc.com
Exception Details: MySql.Data.MySqlClient.MyS