That code doesn't do anything with the DB, so it's difficult to work out what your problem might be. All that code does is set a connections string (which I'll come back to later) and nothing else: the connection is not usable - and is being handled badly anyway.
When you ask a question, you need to include relevant information: "when i try to debug my project every mysql command reads an error" tells nobody anything because we can't see code with does anything with a Command object, or tell what the error messages might be.
Error messages contain a wealth of information if you read them carefully - from which line of which file showed the problem, to a description of the problem that was found. So start here:
How to Write Code to Solve a Problem, A Beginner's Guide Part 2: Syntax Errors[
^] - it talks about syntax errors, but run time errors tend to have the same information presented a little differently.
There is also a good article here:
Asking questions is a skill[
^] which explains how to ask a question so you get a helpful response.
Back to the code you do show, and there are three problems I can see there:
1) Your password for a multiuser DB should never be blank, nor should the default admin name be used - doing so lets anyone who wants to do anything to your DB: steal it, scramble it for a ransom, or destroy it for example. Set a good, strong password on a renamed admin account and you'll be safer.
2) Don't hardcode connection strings into your code: it means that when you release it, you have to change it for the production server (or worse test against the production server which is suicidal) and effectively release untested code! Screwups like that can badly impact clients and negatively impact your reputation and bank balance ... Use a config file to hold the connection string so code doesn't have to be changed when you release it.
3) Don't reuse a single Connection to the DB: Create it when you need one inside a
Using
block and the system will Close and Dispose of it when you are done with it. Not only are such Connections scarce resources, it can cause you real problems if your open a DataReader on a connection and then try to reuse the same connection to INSERT or UPDATE a table: the server will throw an error becuas ethe reader is still using the connection.