Hi.. question about connect to mysql
| From: | Hugo Albero Saucedo | Date: | Sun, 12 Jan 2014 11:11:35 +0000 |
| Subject: | Hi.. question about connect to mysql | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-18145@lists.php.net to get a copy of this message | ||
Hi:
I a Hugo Saucedo from mexico. I am beginner in this php area. I got some problems. I use dreamweaver
and xampp.I try to connect to mysqli with mysqli_connect and i can't. I have to take off
username and password and i can, but then i can create database.
If i put username and password there are errors. Here is my script
<?php// Crea la
conexión$con=mysqli_connect("localhost","hugo","hugo");
// Checa la conexiónif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " .
mysqli_connect_error(); } else { echo "Se conecto a la BD.<p>"; }
This is the error message
Warning: mysqli_connect(): (HY000/1045): Access denied for user
'hugo'@'localhost' (using password: YES) in C:\xampp\htdocs\Connect.php on line
8
Failed to connect to MySQL: Access denied for user 'hugo'@'localhost' (using
password: YES)
i got other computer and i can to acces to mysql, but if i change other user and password makes
error. So i a so confuse. I don't know id there are some problem with my computer, program or
soem script mistake. I would like script mistake. Anyway i apreciate your time and kindly.
Take care... Bye
Best Regards
Hugo Saucedo