php - Warning: mysqli_connect(): (HY000/1045): Access denied for user -


this question has answer here:

i'm new php. trying connect mysql php. error: warning: mysqli_connect(): (hy000/1045): access denied user 'mike'@'localhost' (using password: yes) in c:\abyss web server\connect_db.php on line 5 access denied user 'mike'@'localhost' (using password: yes)

what's wrong connection script?

#set encoding match php script encoding mysqli_set_charset($dbc,'utf8'); ?> 

try this:

<?php $con = mysqli_connect("localhost","my_user","my_password","my_db");  // check connection if (mysqli_connect_errno())   {   echo "failed connect mysql: " . mysqli_connect_error();   } ?> 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -