PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > MySQL
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools Search this Thread
Old 3-4-05, 11:26 AM   #1
ianlin
 
Posts: n/a
Question Error 1044 : Access denied for user to database

Hi guys

I'm a newbie and trying to connect to powweb mysql database, but I got a problem about the connection error. Please hope me on this issuse. Thanks in advance!

Error 1044 : Access denied for user 'ian'@'%' to database 'cdstore'

connection code: (these codes r working fine on my local mysql database, but no idea why it got error on powweb )

<?php
$hostname = "mysql07.powweb.com";
$databasename = "cdstore";
$username = "ian";
$pwd = "******";
//Open a connection to the DBMS
$connection = mysql_connect($hostname, $username, $pwd) or
die ("Could not connect to database");
if (!mysql_select_db($databasename, $connection))
showerror();

function shellclean($array, $index, $maxlength)
{ }

//show error function
function showerror()
{ }
//using get, trim and clean function
$search_text = mysqlclean($_GET, "search_text", 30, $connection);
$artist = mysqlclean($_GET, "artist", 40, $connection);
$song = mysqlclean($_GET, "song", 40, $connection);
$cd_id = mysqlclean($_GET,"cd_id", 10, $connection);
$cd_title = mysqlclean($_GET, "cd_title", 40, $connection);

?>
 
Old 3-4-05, 12:51 PM   #2
Pig
foo
 
Pig's Avatar
 
Join Date: Jan 2003
Location: Seattle-ish
Posts: 2,597
Reputation: 106
Make sure you have your mysql user and password exactly as it says in OPS. They are case sensitive. Also, are you connecting with a script on powweb's server, or trying to run this from home (which will be rejected)?
__________________
webhead.cc
Pig is offline  
Old 3-4-05, 04:48 PM   #3
ianlin
 
Posts: n/a
Hi,
Thanks for ur reply,
1. I use the phpMyAdmin username and password, and I can login and modiy the cdstore database
2. connecting with a script on powwebs's server
 
Old 3-5-05, 05:32 AM   #4
Coolviper1985
 
Coolviper1985's Avatar
 
Join Date: Feb 2003
Location: no
Posts: 131
Reputation: 17
Quote:
Error 1044 : Access denied for user 'ian'@'%' to database 'cdstore'

That's an odd looking error mysql is replacing mysq0X.powweb.com with the % ( wildcard ) char... wonder why?

-Lucas
Coolviper1985 is offline  
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 09:27 PM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright © 2000-2007 Jelsoft Enterprises Limited.