I am running following query
string connStr = "server=localhost;user=sa;port=3306;";
using (var conn = new MySqlConnection(connStr))
{
using (var cmd = conn.CreateCommand())
{
conn.Open();
cmd.CommandText = "CREATE TABLE IF NOT EXISTS `hello.symbols` ( `id` int(11) NOT NULL auto_increment, `country` varchar(255) NOT NULL default '',`animal` varchar(255) NOT NULL default '', PRIMARY KEY (`id`));";
cmd.ExecuteNonQuery();
}
}
And getting this exception "No database selected"
Any Idea how to solve it ?
Thanks
Just append the name of the database to the connection string