|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Posts: n/a
|
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); ?> |
|
|
#2 |
|
foo
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 |
|
|
|
|
#3 |
|
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 |
|
|
#4 | |
|
Join Date: Feb 2003
Location: no
Posts: 131
Reputation: 17
|
Quote:
That's an odd looking error mysql is replacing mysq0X.powweb.com with the % ( wildcard ) char... wonder why? -Lucas |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|