php - SELECT command denied to user cannot connect to database -


i have uploaded website add on domain, given user "tomzino1_user1" correct privileges , added user correct database. php based website written on dreamweaver

when attempt access site (theboatshedmusic.com) comes error message:

select command denied user 'tomzino1_user1'@'localhost' table 'main_table' 

the hosting company's support service checked tables responding correctly , user had been given correct privileges , added config file correctly. suggested there problem scripts working fine mamp testing database.

the config file reads as:

<?php # filename="connection_php_mysql.htm" # type="mysql" # http="true" $hostname_boatshed = "localhost"; $database_boatshed = "tomzino1_boatshed_test"; $username_boatshed = "tomzino_user1"; $password_boatshed = "********"; $boatshed = mysql_pconnect($hostname_boatshed, $username_boatshed, $password_boatshed) or trigger_error(mysql_error(),e_user_error);  ?> 

and first query in index.php file is:

mysql_select_db($database_boatshed, $boatshed); $query_getrecordreviewsarchive = "select distinct date_format(main_table.uploaded, '%m %y') recordreviewsarchive, date_format(main_table.uploaded, '%y-%m') recordreviewslink main_table main_table.type = 'record reviews' order main_table.uploaded desc"; $getrecordreviewsarchive = mysql_query($query_getrecordreviewsarchive, $boatshed) or die(mysql_error()); $row_getrecordreviewsarchive = mysql_fetch_assoc($getrecordreviewsarchive); $totalrows_getrecordreviewsarchive = mysql_num_rows($getrecordreviewsarchive); 

i afraid not experienced php , sql cannot see problem lies.

thank can offer.

try run select in table, same connection parameters.

the command bellow, give privileges need:

grant privileges on database-name.* username@'localhost'; 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -