1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Error 1045 and connection to MySQL database

Discussion in 'PHP' started by 30na, Jul 7, 2007.

  1. #1
    I get this error while try to access MySQL database using phpMyAdmin.

    Unable to establish connection to MySQL
    1045 : Access denied for user 'apache'@'localhost' (using password: NO)

    I don't know what is apache@localhost.

    The error is from server and hosting settings? or there is a php / SQL programming fault?

    Any idea is appreciated.
     
    30na, Jul 7, 2007 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    are you passing a username and password to it? doesnt seem so.

    
    $conn = mysql_connect("localhost","username","password");
    
    PHP:
     
    ansi, Jul 7, 2007 IP
  3. dankenpo

    dankenpo Guest

    Messages:
    30
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try Ansi's suggestion or login with a password, not guest, lol.
     
    dankenpo, Jul 8, 2007 IP
  4. SUSH

    SUSH Peon

    Messages:
    28
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ask your host to change the value of $cfg['Servers'][$i]['user'] , and $cfg['Servers'][$i]['password'] in "config.inc.php" file.
    That's your base user when you use phpmyadmin.
    regards :)
     
    SUSH, Jul 8, 2007 IP
  5. 30na

    30na Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Please let me explain more.

    I'm trying to install a special modified version of CuteNews which uses PHP-MySQL.(The original version of CuteNews does not use MySQL.)

    The installation program needs the following parameters during setup process :

    Database Server...

    Database User Name ...

    Database Password...

    Database Name ...

    -----------------
    The problem is that on my hosting server there is a different setting than usual setting.

    There is not localhost , instead I see these settings via my control panel and phpMyadmin :

    Database Server = an IP address has been given via TCP/IP. (I name it IP1)

    (Instead of localhost via Unix.)

    User Name = username@anohter IP address. (I name it IP2)

    -----------------

    The server management system is Apache 2.

    Can any one help about what I should fill in ... places?
     
    30na, Jul 15, 2007 IP