beamblues50
New Member
- Messages
- 7
- Reaction score
- 0
- Points
- 0
Hi. I have created a database and a user with their respective password. In my php code I have:
$link = mysql_connect('localhost', 'my_user_name', 'my_password');
if (!$link) {exit;}
echo 'Connected successfully<br>';
$db_selected = mysql_select_db('my_database_name', $link);
if (!$db_selected) {
die (mysql_error());}
Then the result is:
Connected successfully
Access denied for user 'my_user_name'@'localhost' to database 'my_database_name'
I'll tried add in cPanel Remote Database: 69.175.6.94, init.fris.x10hosting.com, and stoli.x10hosting.com, without improvement. The strangle is that by MyPHPadmin I can access and create/alter tables. Somebody can help me?
Thanks,
$link = mysql_connect('localhost', 'my_user_name', 'my_password');
if (!$link) {exit;}
echo 'Connected successfully<br>';
$db_selected = mysql_select_db('my_database_name', $link);
if (!$db_selected) {
die (mysql_error());}
Then the result is:
Connected successfully
Access denied for user 'my_user_name'@'localhost' to database 'my_database_name'
I'll tried add in cPanel Remote Database: 69.175.6.94, init.fris.x10hosting.com, and stoli.x10hosting.com, without improvement. The strangle is that by MyPHPadmin I can access and create/alter tables. Somebody can help me?
Thanks,