I am new to MySQL, I am setting up a database connection to be used for a C# application. I am following a youtube tutorial on setting up this connection, but I am confused on what is a Server name? Is it just the IP Address or do I have to include the company domain name whos providing the server. Would the following be correct?
private void Initialize()
{
server = "xxx.1x4.xxx.15x";
database = "nameOfDatabase";
uid = "username123";
password = "pass123";
string connectionString;
connectionString = "SERVER=" + server + ";" + "DATABASE=" +
database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
connection = new MySqlConnection(connectionString);
}
Using the ip adress along with the actual port for the mysql service will work unless security measures have been taken to prevent access.
example : 127.0.0.1:1840