PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 22nd, 2000, 05:20 AM
lee stone lee stone is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 3 lee stone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hi

I hope someone can help me here?

my hosting ISP imposes access limits on use of Mysql. I have to telnet in and then change directory to /usr/local/mysql and call mysql by typing
"./bin/mysql DATABASENAME --user=user --password=password" (without the quotes of course)

just telnetting in and then typing "mysql..." doesnt work, I just get 'file not found' error

when using php in a webpage I have to call mysql somehow. just using

"mysql_connect("localhost", "user", "password");" (again, without quotes)

doesnt work.

any clues?

thanks

lee

Reply With Quote
  #2  
Old March 22nd, 2000, 10:01 AM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 12 m 27 sec
Reputation Power: 56
There are 2 possibilities:

1. The "localhost" in mysql_connect("localhost", "user", "password") is probably where your problem is. Try substituting it with the IP address of the host you log into with telnet. or the hostname, or the hostname.domainname combo.

Mysql can be configured to accept connections only from a certain host, which is usually what is meant by 'access restrictions' for mysql.

BTW the shorthand for the mysql connect syntax is mysql DATABASENAME -u user -p (you are then prompted for the password in standard Unix style (so your password is not visible on the terminal)

2. PHP is not configured correctly. Your ISP should fix this. Also, if your ISP thinks it's imposing 'access limits' simply by making people cd to another directory, that's idiotic. I think it's more likely that #1 is the answer to your problem.

Reply With Quote
  #3  
Old March 22nd, 2000, 10:42 AM
lee stone lee stone is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 3 lee stone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks rycamor, I will give this a go.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rycamor:
There are 2 possibilities:
....
[/quote]


Reply With Quote
  #4  
Old March 22nd, 2000, 11:02 AM
lee stone lee stone is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 3 lee stone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I tried using rycamor's suggestions above and still got rejected.

In case anyone else hits the problem, the appears is to replace "localhost" with "127.0.0.1:/path/to/socket", it works fine!



Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > mysql_connect to specific directory on server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT