Solve problem with my php and mySQL program?

Discussion in 'PHP' started by cskanna, Apr 13, 2007.

Thread Status:
Not open for further replies.
  1. #1
    Hi all,

    I have done a program in php and mysql using software WAMP5 PHP5- Appache 2- MySQL 5

    Server Configuration
    Apache version :
    Apache/2.2.4 (Win32)

    PHP version :
    5.2.1

    Loaded extensions :
    bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, apache2handler, mbstring, mysql, mysqli, PDO, pdo_sqlite, SQLite

    MySQL version :
    5.0.27-community-nt

    Well, I have got this error when trying to excute a file istall.php which I create mysql database using php script but it is giving me this error and when i open database.php and the lin 26 is this code
    $conn = mysql_connect($sql_host,$sql_username,$sql_password);

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\Program Files\wamp\www\CMT3092\database.php on line 26
    Cannot conect to the server... : Access denied for user 'root'@'localhost' (using password: YES)

    I really be very grateful if anyone can help me and tell me what is wring or if i can send them all the files and checked by using that software wamp beacuse i use password in mysql but in the wamp systen mysql there is not databse tho. Thanks all in advance.
     
    cskanna, Apr 13, 2007 IP
  2. lbalance

    lbalance Peon

    Messages:
    381
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    that just looks like a login error.

    double check your password.
    i think root should automatically have mysql permissions but you might want to check that too.
     
    lbalance, Apr 13, 2007 IP
  3. PresFox

    PresFox Active Member

    Messages:
    218
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    default in wampp, root has no password
     
    PresFox, Apr 14, 2007 IP
  4. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Remove the password field it will work no need to add password. I agree with PresFox default in Wamp, root has no password.
     
    Subikar, Apr 15, 2007 IP
Thread Status:
Not open for further replies.