Unable to connect to database: Access denied for user ''@'localhost' to database 'socialdb'

后端 未结 6 1134
野趣味
野趣味 2021-01-21 11:07

I\'ve seen a few errors like this, but I found no answer.

Unable to connect to database: Access denied for user \'\'@\'localhost\' to database \'socialdb\'
         


        
6条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 11:49

    even if you are not having a user. there exist 'root' user so use it

    $con = mysql_connect('localhost','root','');
    

提交回复
热议问题