Please help me on mysql_connect

Silmaril

New Member
Messages
13
Reaction score
0
Points
0
only thing i can think is to check that your info is all correct as it is case sensitive... but i figure ull know that.

That is what Martin suggested too, ull notice he changed LocalHost to localhost (as it should be)
 
Last edited:

amjames

New Member
Messages
7
Reaction score
0
Points
0
Im also getting the
Access denied for user 'amjames_webApp'@'localhost' (using password: YES)

im using C# but know im getting my username and password right

Code:
MySqlConnection oConn =
                new MySqlConnection("Database=amjames_webApp;Data Source=localhost;User id=amjames_webApp;Password=This Is Not Yes");
            oConn.Open();

            MySqlCommand command =
                new MySqlCommand("pestAdd", oConn);
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new MySqlParameter("?IcompanyName", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?IsiteName", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Icontact", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Itelephone", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Iemail", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Inotes", MySqlDbType.VarChar, 5000));

            command.Parameters[0].Value = txtCompanyName.Text;
            command.Parameters[1].Value = txtSiteName.Text;
            command.Parameters[2].Value = txtContact.Text;
            command.Parameters[3].Value = txtTelephine.Text;
            command.Parameters[4].Value = txtEmail.Text;
            command.Parameters[5].Value = txtNotes.Text;
            command.ExecuteNonQuery(); 
  
           oConn.Close();
 

sirSam

New Member
Messages
10
Reaction score
0
Points
0
i thank all those who helped me here. thanks for the replies.

i finally figured out the error.
i am using different user name because of the variable.
i was using $dbUsername which should be $dbUserName.
I was so accustomed in developing websites using asp plus vbscript and variable cases there does not affect the names of variables, that why.. ;)

thanks again.
here i come php!!!
more power x10hosting!
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
Glad to hear your problem is fixed :). Your problem is the reason I, as well as many others code everything in lowercase. I'm torn between using underscores or not though (leaning towards _'s).

Im also getting the
Access denied for user 'amjames_webApp'@'localhost' (using password: YES)

im using C# but know im getting my username and password right

Code:
MySqlConnection oConn =
                new MySqlConnection("Database=amjames_webApp;Data Source=localhost;User id=amjames_webApp;Password=This Is Not Yes");
            oConn.Open();

            MySqlCommand command =
                new MySqlCommand("pestAdd", oConn);
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new MySqlParameter("?IcompanyName", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?IsiteName", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Icontact", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Itelephone", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Iemail", MySqlDbType.VarChar, 30));
            command.Parameters.Add(new MySqlParameter("?Inotes", MySqlDbType.VarChar, 5000));

            command.Parameters[0].Value = txtCompanyName.Text;
            command.Parameters[1].Value = txtSiteName.Text;
            command.Parameters[2].Value = txtContact.Text;
            command.Parameters[3].Value = txtTelephine.Text;
            command.Parameters[4].Value = txtEmail.Text;
            command.Parameters[5].Value = txtNotes.Text;
            command.ExecuteNonQuery(); 
  
           oConn.Close();
Is this code server-side or client side? x10's servers have firewalls that only allow the mySQL database to connect through localhost, thus the files have to be on this server.
 
Top