Warning: mysqli_connect(): (HY000/1045): Access denied for user 'username'@'localhost' (using password: YES)

前端 未结 21 2131
春和景丽
春和景丽 2020-11-22 06:31

Warning: mysqli_connect(): (HY000/1045): Access denied for user \'username\'@\'localhost\' (using password: YES) in C:\\Users\\xampp\\htdocs\\PHP_Login_Script

21条回答
  •  北海茫月
    2020-11-22 07:30

    If youre running wamp update

    define("DB_HOST", "localhost");
    

    To your machines ip address (mine is 192.168.0.25);

    define("DB_HOST", "192.168.0.25");
    

    You can find it on window by typing ipconfig in your console or ifconfig on mac/linux

提交回复
热议问题