mdvignesh Posted September 10, 2012 Share Posted September 10, 2012 I created a password in wamp server than i added that password in new mysqli("localhost","root","beam","lms") Now iam getting error : Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ''@'localhost' (using password: NO) in on line 169 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in on line 169 (Before having password thatis without password it was working good) Link to comment https://forums.phpfreaks.com/topic/268202-access-denied-for-user-in-mysql_real_escape_string/ Share on other sites More sharing options...
requinix Posted September 10, 2012 Share Posted September 10, 2012 You're mixing mysqli with mysql. Can't do that. Pick one extension and use it. mysqli_real_escape_string Link to comment https://forums.phpfreaks.com/topic/268202-access-denied-for-user-in-mysql_real_escape_string/#findComment-1376617 Share on other sites More sharing options...
ManiacDan Posted September 10, 2012 Share Posted September 10, 2012 Also, change your root database password to something that isn't a 4 letter english word. edit: and don't use the root user for your website in the first place. Link to comment https://forums.phpfreaks.com/topic/268202-access-denied-for-user-in-mysql_real_escape_string/#findComment-1376731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.