Tente remover
'
da sua consulta e use Prepare
depois de adicionar parâmetros:cmd = new MySqlCommand("SELECT * FROM admin WHERE [email protected] AND admin_password=PASSWORD(@val2)", MySqlConn.conn);
cmd.Parameters.AddWithValue("@val1", tboxUserName.Text);
cmd.Parameters.AddWithValue("@val2", tboxPassword.Text);
cmd.Prepare();