Closed Thread
Results 1 to 8 of 8

Thread: Connection to mysql denied via php
      
   

  1. #1
    hendriks is offline Private First Class
    Join Date
    Jan 2008
    Posts
    7

    Default 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

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default 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

  3. #3
    hendriks is offline Private First Class
    Join Date
    Jan 2008
    Posts
    7

    Smile 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

  4. #4
    VFRodriguez's Avatar
    VFRodriguez is offline Staff Sergeant
    Join Date
    Dec 2007
    Posts
    45

    Default 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.

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default Re: Connection to mysql denied via php

    Quote 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!


  6. #6
    hendriks is offline Private First Class
    Join Date
    Jan 2008
    Posts
    7

    Default 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";
    ?>

  7. #7
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default 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!


  8. #8
    hendriks is offline Private First Class
    Join Date
    Jan 2008
    Posts
    7

    Default Re: Connection to mysql denied via php

    Thank You

Thread Information

Users Browsing this Thread

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

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49