Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > mySQL & PHP

Notices

mySQL & PHP Discussions, information and help with mySQL and PHP.

Closed Thread
 
LinkBack Thread Tools
  #1  
Old 01-02-2008, 11:15 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #2  
Old 01-02-2008, 09:38 PM
Watdaflip's Avatar
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,643
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old 01-03-2008, 08:09 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old 01-03-2008, 08:44 AM
Corporal
 
Join Date: Dec 2007
Posts: 10
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old 01-03-2008, 11:51 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old 01-04-2008, 10:43 AM
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";
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old 01-04-2008, 10:50 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old 01-04-2008, 11:07 AM
Private First Class
 
Join Date: Jan 2008
Posts: 7
Default Re: Connection to mysql denied via php

Thank You
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 04:00 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2007 VodaHost.com - All Rights Reserved

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 50 51 52 53 54