Results 1 to 2 of 2

Thread: i can't to connect database mysql with php,

  1. #1
    Join Date
    Jan 2014

    Talking i can't to connect database mysql with php,

    I can't to connect database mysqli with php. I a using localhost with XAMPP. i can only connecty using localhost, without username and password. If i just put localhosat i can access, but i can't create database. so i don't what to do. Here is my script.
    // Crea la conexión

    // Checa la conexión
    if (mysqli_connect_errno())
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    echo "Se conecto a la BD.<p>";

    And this is 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)

    Anyway thanks for read this question and have a nice day.
    Last edited by NogDog; 01-12-2014 at 06:47 PM. Reason: obfuscated password, just in case that was reallly it

  2. #2
    Join Date
    Aug 2004
    Have you in fact created a MyQL user with that name and password yet?
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center