error connecting to databaseAccess denied for use 'root'@'localhost(using password:YES)
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
using System.Windows.Forms;
using DPUruNet;
using System.Drawing.Imaging;
using System.Drawing;
namespace UareUBiometrics
{
class HelperFunctions
{
private static Fmd[] fmds;
private static Fmd[] allDBFmds;
public static Fmd[] GetAllFmds
{
get { return allDBFmds; }
}
private static string[] allUserNames;
public static string[] GetAllUserNames
{
get { return allUserNames; }
}
private static int[] allfingerIDs;
public static int[] GetallfingerIDs
{
get { return allfingerIDs; }
}
public static MySqlDataReader ConnectDBnExecuteSelectScript(string Script)
{
string connectionString = "server=localhost;User Id=root;database=customerInfo;Password=";
MySqlDataReader dataReader = null;
MySqlConnection conn = new MySqlConnection(connectionString);
try
{
conn.Open();
MySqlCommand sqlCommand = new MySqlCommand(Script, conn);
dataReader = sqlCommand.ExecuteReader(CommandBehavior.CloseConnection);
}
catch (MySqlException ex)
{
MessageBox.Show("Error opening connection" + ex.Message);
}
return dataReader;
}