Mysql – #1044 – Access denied for user ‘#username’@’10.%’ to database ‘#database’

authenticationMySQL

I'm trying to connect my webpage to mySQL with ipage hosting. When I copy the snippet:

<?php 
$link = mysql_connect('username.ipagemysql.com', 'username for mySQL', 'password for mySQL'); 
if (!$link) { 
die('Could not connect: ' . mysql_error()); 
} 
echo 'Connected successfully'; 
mysql_select_db(name of database); 
?> 

from ipage and link the .php-file to my website in an attempt to establish a test connection I get an error message:

"Could not connect: Access denied for user '#username'@'boscustweb3102.eigbox.net' (using password: YES)"

When I use mySQLadmin on the ipage site and enter the query:

GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'IP-of-DBServer';

I get another error message:

"#1044 – Access denied for user '#username'@'10.%' to database '#database'"

I am currently using Dreamweaver and trying to establish a form of validation login with only 1 user to be able to create events for a calendar and an input form to create news for my website.


1st edit:

Here's some extra information:

When I try this query:

SELECT USER() RequestedUserLogin,CURRENT_USER() AllowedUserLogin;

I get the results:

RequestedUserLogin: #username@myadmin01.int.bizland.net
AllowedUserLogin: #username@10.%

By searching for ipage mySQL IP addresses by using the query:

SHOW VARIABLES WHERE Variable_name = 'hostname'

I got this:

Hostname: boscustsqlm56.eigbox.net

To find the appropriate IP adresses I used the website service http://www.hcidata.info/host2ip.cgi:

boscustsqlm56.eigbox.net – 38.113.1.135
myadmin01.int.bizland.net – Cannot be resolved to an IP address

Best Answer

have you tried using a password for your user also, when granting privileges?

GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'IP-of-DBServer' identified by 'password for mySQL';