MySqlTalk.com  

Go Back   MySqlTalk.com > MySQL > Installation
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread
Old 08-25-2004, 08:48 AM   #1
mmitchel
Junior Member
 
Join Date: Aug 2004
Posts: 2 mmitchel is on a distinguished road
Access problems

I have installed mysql 4.0.20 on a system running Fedora Core 1 . I installed from source code. Mysql starts fine and I can access it locally, creating db's, tables and inserting data.

The box sits behind a router and any attempt to access from a remote source fails. the router passes through http requests and port 3306 is open.

In the course of trying to figure this out, I began testing different connections from the local machine, using a php script. What I found was that a connection attempt using localhost

<?php
$link = mysql_connect('localhost','xxx','yyy') ;
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully' ;
mysql_close($link) ;
?>

works fine.

If I run the same php script using 127.0.0.1 to identify the host, the connection fails with the error message:

mysql_connect(): Access denied for user: 'xxx@localhost.localdomain' (Using password: YES)

The skip networking directive is de-activated in the my.cnf file. I have run the mysql command - grant all privileges on *.* to 'xxx@%' identified by 'yyy' ; and done a flush privileges afterwards.

I guess my questions boils down to - why does 127.0.0.1 not work to identify the host

Is there something else I need to do to allow remote access ???

Frustrated in Ottawa..
mmitchel is offline   Fork this post Reply With Quote
Old 09-02-2004, 04:00 AM   #2
Administrator
Administrator
 
Join Date: Jun 2004
Posts: 383 Administrator is on a distinguished road
Re: Access problems

Quote:
Originally Posted by mmitchel
I have installed mysql 4.0.20 on a system running Fedora Core 1 . I installed from source code. Mysql starts fine and I can access it locally, creating db's, tables and inserting data.

The box sits behind a router and any attempt to access from a remote source fails. the router passes through http requests and port 3306 is open.

In the course of trying to figure this out, I began testing different connections from the local machine, using a php script. What I found was that a connection attempt using localhost

<?php
$link = mysql_connect('localhost','xxx','yyy') ;
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully' ;
mysql_close($link) ;
?>

works fine.

If I run the same php script using 127.0.0.1 to identify the host, the connection fails with the error message:

mysql_connect(): Access denied for user: 'xxx@localhost.localdomain' (Using password: YES)

The skip networking directive is de-activated in the my.cnf file. I have run the mysql command - grant all privileges on *.* to 'xxx@%' identified by 'yyy' ; and done a flush privileges afterwards.

I guess my questions boils down to - why does 127.0.0.1 not work to identify the host

Is there something else I need to do to allow remote access ???

Frustrated in Ottawa..

Did you get this sorted out? I've experienced similar issues and had to define hosts in various ways before it worked. Don't know why.
Administrator is offline   Fork this post Reply With Quote
Old 09-02-2004, 07:07 AM   #3
mmitchel
Junior Member
 
Join Date: Aug 2004
Posts: 2 mmitchel is on a distinguished road
Re: Access problems

No - I have not sorted this out yet. What kind of changes did you have to make to the hosts file to get it working.
mmitchel is offline   Fork this post Reply With Quote
Old 09-02-2004, 07:27 AM   #4
Administrator
Administrator
 
Join Date: Jun 2004
Posts: 383 Administrator is on a distinguished road
Re: Access problems

Quote:
Originally Posted by mmitchel
No - I have not sorted this out yet. What kind of changes did you have to make to the hosts file to get it working.


I meant added various hostnames to the MySQL access list. I had to do it in various ways. Did you include http:// before the IP? (On mine it's without.)

I went to http://whatismyip.com and checked how it looked there and found out that my IP wasn't enough. I had to also add .rr.com
Administrator is offline   Fork this post Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access pass through query - ODBC error Snowsride SQL syntax 0 12-22-2004 10:04 AM
MySQL account login problems lectrospin General 6 11-24-2004 08:59 AM
Table access problem hillxy General 1 10-20-2004 01:48 PM
Import Access, Excel and data of other formats to MySQL by Navicat NavicatGuy Articles 0 08-17-2004 01:08 AM
2 Installing MySQL Administrator Documentation 103 06-09-2004 02:53 AM



All times are GMT -4. The time now is 01:21 PM.



Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Google
  Web http://www.mysqltalk.com
DISCLAIMERS:
1. We have no commercial interest in this site.
Banner Ads and Subscriptions will only be used to help pay for hosting and maintenance costs.
2. MySQLTalk.com is NOT affiliated with MySQL AB in any way.
3. MySQLTalk.com is NOT endorsed by MySQL AB in any way.
4. Please do not post any content that is harmful to MySQL or MySQL AB, meaning no misleading or obsolete information will be tolerated.
Well-founded constructive criticism meant to help the community is permitted.
5. This website is founded with the goal of improving the MySQL community.
We not only tolerate newbies, we encourage them.
Please do not ask newbies to "read the manual".