I'm not sure what you want to do, especially what you mean: "
i want to write server name, user name and password in mysql query". Remember, before you can execute query, you need to connect to the MySQL server.
How to connect to MySQL database?
http://www.connectionstrings.com/mysql[
^]