Connection to mysql denied via php

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hendriks
    Private First Class

    • Jan 2008
    • 7

    Connection to mysql denied via php

    When I tried to create a simple table for testing purposes I've got the following message :

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'fgnzvvaa_peet'@'voda20.voda20.com' (using password: YES) in /home/fgnzvvaa/public_html/phpdbase/skep1.php on line 3
    Access denied for user 'fgnzvvaa_peet'@'voda20.voda20.com' (using password: YES)

    I did follow the instructions clearly on how to create database and user.
    Plus I did connect the user to the database.
    The password is correct . password = klub2008
    I also put in the IP address of a possible remote server because I have not transfer everything to vodahost yet.
    Please help me
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: Connection to mysql denied via php

    Where ever you have "voda20.voda20.com" set, change it to be "localhost" instead

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    • hendriks
      Private First Class

      • Jan 2008
      • 7

      #3
      Re: Connection to mysql denied via php

      I don't know where to look but for me it is a starting point.
      Thank you very much

      Comment

      • VFRodriguez
        Sergeant First Class

        • Dec 2007
        • 55

        #4
        Re: Connection to mysql denied via php

        For me is also a starting point. I learned that in the connection statement you must include the DATABASE USER, DATABASE PASSWORD and DATABASE HOST (last one is "localhost") but need to create first the DATABASE NAME. If you have not created the database, that error will occur.
        Victor
        My Website

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Connection to mysql denied via php

          Originally posted by hendriks View Post
          I don't know where to look but for me it is a starting point.
          Thank you very much
          You must look in your connection script or in your configuration file. You have mistaken the host
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • hendriks
            Private First Class

            • Jan 2008
            • 7

            #6
            Re: Connection to mysql denied via php

            My script is :
            <?php
            // Connects to your Database
            mysql_connect("www.offventure.com", "fgnzvvaa_peet", "klub2008") or die(mysql_error());
            mysql_select_db("fgnzvvaa_club") or die(mysql_error());
            mysql_query("CREATE TABLE toets ( name VARCHAR(30),
            age INT, car VARCHAR(30))");
            Print "Your table has been created";
            ?>

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: Connection to mysql denied via php

              As watdaflip said your problem is that you have provided your domain name as host, whilst it should be "localhost".
              The third line should be:

              mysql_connect("localhost", "fgnzvvaa_peet", "klub2008") or die(mysql_error());
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • hendriks
                Private First Class

                • Jan 2008
                • 7

                #8
                Re: Connection to mysql denied via php

                Thank You

                Comment

                Working...
                X