Loading ...
Sorry, an error occurred while loading the content.
 

Re: [bang-phpug] i have problem in connecting sql server... help me..

Expand Messages
  • Imran Khan
    Hi, Its very simple. You are using mysql_password but it should jsut be password. Example: $link = mysql_connect( localhost , mysql_user , password ); Please
    Message 1 of 7 , Jul 4, 2009
      Hi, Its very simple.

      You are using mysql_password but it should jsut be password.
      Example: $link = mysql_connect('localhost', 'mysql_user', 'password');

      Please let me know if this is sorted out.

      *Warm Regards*
      *Imran Khan*
      *PHP Project Lead*


      Still i get a problem in connecting sql database in php.....my coding is
      <?php
      $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
      if (!$link) {
      die('Could not connect: ' . mysql_error());
      }
      echo 'Connected successfully';
      mysql_close($link);
      ?>
      the errors are

      Warning: mysql_connect() [function.mysql-connect]: Access denied for user
      'mysql_user'@'localhost' (using password: YES) in
      C:\wamp\www\php\connect.php on line 2
      Could not connect: Access denied for user 'mysql_user'@'localhost' (using
      password: YES)

      .............help me.........


      >


      [Non-text portions of this message have been removed]
    • chittaranjan
      Hi Arul, It seems your user id is not bind with the database. Go to admin panel an give access privilege to uer database user. Thanks, Chitta
      Message 2 of 7 , Jul 4, 2009
        Hi Arul,
        It seems your user id is not bind with the database.
        Go to admin panel an give access privilege to uer database user.

        Thanks,
        Chitta



        ________________________________
        From: arul_sreeyaa2006 <arul_sreeyaa2006@...>
        To: bang-phpug@yahoogroups.com
        Sent: Saturday, 4 July, 2009 4:04:56 PM
        Subject: [bang-phpug] i have problem in connecting sql server... help me..





        Still i get a problem in connecting sql database in php.....my coding is
        <?php
        $link = mysql_connect( 'localhost' , 'mysql_user' , 'mysql_password' );
        if (!$link) {
        die('Could not connect: ' . mysql_error( ));
        }
        echo 'Connected successfully' ;
        mysql_close( $link);
        ?>
        the errors are

        Warning: mysql_connect( ) [function.mysql- connect]: Access denied for user 'mysql_user' @'localhost' (using password: YES) in C:\wamp\www\ php\connect. php on line 2
        Could not connect: Access denied for user 'mysql_user' @'localhost' (using password: YES)

        ............ .help me.........





        Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com

        [Non-text portions of this message have been removed]
      • Koushik G raj
        Hi Arul, it seems to be you are trying to connect with MS SQL not My SQL. please go through the url http://www.webcheatsheet.com/PHP/connect_mssql_database.php
        Message 3 of 7 , Jul 6, 2009
          Hi Arul,

          it seems to be you are trying to connect with MS SQL not My SQL.
          please go through the url
          http://www.webcheatsheet.com/PHP/connect_mssql_database.php


          --- On Sun, 5/7/09, Ramkumar <mailtoramkumar@...> wrote:

          From: Ramkumar <mailtoramkumar@...>
          Subject: Re: [bang-phpug] i have problem in connecting sql server... help me..
          To: bang-phpug@yahoogroups.com
          Date: Sunday, 5 July, 2009, 5:32 AM

















          Does the user exist and the password is correct for the mysql DB user?



          - Ram



          arul_sreeyaa2006 wrote:

          >

          >

          > Still i get a problem in connecting sql database in php.....my coding is

          > <?php

          > $link = mysql_connect( 'localhost' , 'mysql_user' , 'mysql_password' );

          > if (!$link) {

          > die('Could not connect: ' . mysql_error( ));

          > }

          > echo 'Connected successfully' ;

          > mysql_close( $link);

          > ?>

          > the errors are

          >

          > Warning: mysql_connect( ) [function.mysql- connect]: Access denied for

          > user 'mysql_user' @'localhost' (using password: YES) in

          > C:\wamp\www\ php\connect. php on line 2

          > Could not connect: Access denied for user 'mysql_user' @'localhost'

          > (using password: YES)

          >

          > ............ .help me.........

          >

          >





























          Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/

          [Non-text portions of this message have been removed]
        • Manish kumar
          try userName root and password (blank with no space b/w quotes).
          Message 4 of 7 , Aug 2, 2009
            try userName 'root' and password ''(blank with no space b/w quotes).
          • Manish kumar
            try username root and password (no white space b/w. quotes)
            Message 5 of 7 , Aug 2, 2009
              try username 'root' and password ''(no white space b/w. quotes)
            Your message has been successfully submitted and would be delivered to recipients shortly.