I am in the process of creating a basic web interface to access a mysql database. I have XAMPP installed and am now trying to connect the website to the XAMPP server. This is my connection string code:
<connectionStrings>
<add name="HRDBConnection"
connectionString="Data Source=localhost;Initial Catalog=HRDatabase;User ID=root;Password="
providerName="System.Data.SqlClient" />
</connectionStrings>
From what I can gather my data source should be localhost with the user name and password being the default root and blank respectively.
When I run the code from VS, I get this error on the website where the database tables should show:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I already tried googling this, but all the solutions online I find say I should make the data source = localhost which isn't working. I am not sure if the local host is maybe used for just a SQL server, or if it is for a mysql database through XAMPP. I have XAMPP running the mysql server and I can edit the tables through phpmyadmin.