1

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: #[email protected]
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

1 Answer 1

1

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';
2
  • Yes, I have tried both the mySQL password that I made and the hostsite password and username aswell. it still gives me the error.
    – Tetsujin
    May 31, 2014 at 19:37
  • i also had this problem once and i solved it by allowing the user on all dbs, using *.* instead of mydb.*,but this wasn't a security issue for me.
    – bob
    Jun 1, 2014 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.