Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup Elmah with MySQL?

Tags:

asp.net

elmah

I have run the Elmah nuget package, copied the mysql.data.dll to the bin folder and run the mySQL script in the database but where do I state the address and login to the database?

Best regards

like image 720
Banshee Avatar asked Jan 23 '26 14:01

Banshee


1 Answers

If you've already installed Elmah and created the tables in your database all your should need to do now is make sure the tables have the correct permissions then edit the connection string for Elmah in your web.config to include the username and password for whatever account you'll access the DB from the same as any other connection string but using the MysqlClient

In your web.config you should have something similar to:

<elmah>
   <errorLog type="Elmah.MySqlErrorLog, Elmah" connectionStringName="Elmah.MySql" />
   <security allowRemoteAccess="1" />
</elmah>

And also elsewhere in the connection strings bit something along the lines of:

<connectionStrings>
    <add name="Elmah.MySql" connectionString="[STUFF HERE];User ID=[WHATEVER];Password=[WHATEVER];" providerName="System.Data.MySqlClient" />
</connectionStrings>
like image 160
FGhilardi Avatar answered Jan 25 '26 12:01

FGhilardi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!