0

im trying to connect and check user information in c# via php and when i use webrequest i got this error:

i got this error:1045error_access denied for "myuser"@myhostaddress (using password:Yes)

its my c# related code

MyWebRequest myRequerst = new MyWebRequest("http://mysite", "POST", "apikey=compo#1&DBKEY=loginrequest&trans_loguser=" + usernametxt.Text + "&trans_logpass=" + passtxt.Text);

and its my php connection string

$connection_obj = mysqli_connect("my site", "myusername", "mypassword", "mydbname");
        if (!$connection_obj) 
        {
            echo "Error No: " . mysqli_connect_errno();
            echo "Error Description: " . mysqli_connect_error();

            exit;
        }   

what should i do???

Dharman
  • 21,838
  • 18
  • 57
  • 107
  • That's a basic MySQL error - it's saying your database username/password is wrong. *What should you do?* Enter the correct username and password - check the privileges in the `mysql.user` and `mysql.db` tables, make sure whatever user you're attempting to connect with, is allowed to. – CD001 Dec 06 '19 at 10:03
  • Does this answer your question? [MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)](https://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw) – CD001 Dec 06 '19 at 10:08
  • Unrelated but please read: https://stackoverflow.com/q/58808332/1839439 – Dharman Dec 06 '19 at 12:07

0 Answers0