473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

MYSQL access works on Server as LOCALHOST but not from PC?

Hi,

I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.

$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';

<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>

<<<PROBLEM>>>

I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC

But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets

Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)

Nov 3 '07 #1
5 1785
martin99 wrote:
Hi,

I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.

$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';

<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>

<<<PROBLEM>>>

I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC

But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets

Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)

Very simple. You don't have access to MySQL.

To figure out why, try asking in comp.databases.mysql.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 3 '07 #2
Jerry Stuckle wrote:
martin99 wrote:
>Hi,

I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.

$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';

<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>

<<<PROBLEM>>>

I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC

But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets

Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)


Very simple. You don't have access to MySQL.

To figure out why, try asking in comp.databases.mysql.
Hint. Default MySql does NOT allow remote database access. Needs setting
up. At the whole database level, and possibly at user and table level.
Take your time.
Nov 3 '07 #3
The Natural Philosopher wrote:
Jerry Stuckle wrote:
>martin99 wrote:
>>Hi,

I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.

$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';

<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>

<<<PROBLEM>>>

I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC

But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets

Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)


Very simple. You don't have access to MySQL.

To figure out why, try asking in comp.databases.mysql.
Hint. Default MySql does NOT allow remote database access. Needs setting
up. At the whole database level, and possibly at user and table level.
Take your time.
Hint - that's not his problem. But the folks in comp.databases.mysql
will give him the correct answer.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 3 '07 #4
Jerry Stuckle wrote:
The Natural Philosopher wrote:
>Jerry Stuckle wrote:
>>martin99 wrote:
Hi,

I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.

$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';

<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>

<<<PROBLEM>>>

I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC

But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets

Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)

Very simple. You don't have access to MySQL.

To figure out why, try asking in comp.databases.mysql.
Hint. Default MySql does NOT allow remote database access. Needs
setting up. At the whole database level, and possibly at user and
table level. Take your time.

Hint - that's not his problem.
It is.
But the folks in comp.databases.mysql
will give him the correct answer.
Nov 3 '07 #5
The Natural Philosopher wrote:
Jerry Stuckle wrote:
>The Natural Philosopher wrote:
>>Jerry Stuckle wrote:
martin99 wrote:
Hi,
>
I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.
>
$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';
>
<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>
>
<<<PROBLEM>>>
>
I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC
>
But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets
>
Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)
>
>

Very simple. You don't have access to MySQL.

To figure out why, try asking in comp.databases.mysql.

Hint. Default MySql does NOT allow remote database access. Needs
setting up. At the whole database level, and possibly at user and
table level. Take your time.

Hint - that's not his problem.

It is.
But the folks in comp.databases.mysql
>will give him the correct answer.
Wrong. Find out in comp.databases.mysql.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 3 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Neil | last post by:
Hi, I hope this question isn't too far off topic....I'm almost at my wits end trying to figure this out. I have a Mysql database and I wish to automate the backup of the database because I...
1
by: Ken | last post by:
First time I have installed mysql. I have not been able to connect to the server/database with a new php installation. I have installed IIS. Do I need this for mysql? The php works fine. ...
0
by: Monica Ferrero | last post by:
Hi! I'm not sure if this is the most adequate mySQL list for this post. If not, please indicat me which one I should use... I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
4
by: Adam Smith | last post by:
I have a dedicated server running 'FreeBSD 4.9 STABLE' at a hosting site. They have done some default installations, presumably from the CVS ports package ??. Herein lies the problem, "I do not...
5
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
5
by: news.telia.net | last post by:
Hi! I have a question. I have installed php and mysql on an apache-server on windows and I can't connect to the server. I tried to create a database (since I am trying to learn howto). My...
12
by: mistral | last post by:
phpMyAdmin 2.6.2 problem: can no connects to mySQL database: each time shown error #1045 - Access denied for user 'username'@'192.168.1.2' (using password: YES) Is seems, this is most common...
1
Ajm113
by: Ajm113 | last post by:
I am running the Bizzar Server and I got mysql and php working. I created a login/logout page that does the user stuff and it works 100%. But if I used mysql on some other page I get these warnings....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.