Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Problems connecting to external MySQL database
Old 04-25-2006, 09:42 PM Problems connecting to external MySQL database
Novice Talker

Posts: 13
Trades: 0
I uploaded my site to the schools server, however, I was not able to get a MySQL database from them, so I wanted to have the php script save the names and email address that people entered to the database on my personal server.

I replaced:

$db = mysql_connect("localhost", xxxxx, xxxxx)

with:

$db = mysql_connect("myserver.com", xxxx, xxxx)

I had it as localhost so I was able to have the whole thing working when I built the site on my server. Now, since its stored on the schools server I need to change it. Heres the error it gives me:

Warning: mysql_connect(): Lost connection to MySQL server during query in /usr/local/apache/ysuweb/stu_org/SADD/_saddInfo.php on line 20
Lost connection to MySQL server during query

Any help ASAP would be GREAT!!! Thanks!!

btw... this is for our schools Students Agaist Destructive Decisions ( or drunk driving) chapter... so know you're helping a good cause
racertim is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-26-2006, 10:09 AM Re: Problems connecting to external MySQL database
Novice Talker

Posts: 13
Trades: 0
Hey people... I REALLY need help!!! We launched the site this morning and i have to run it off my personal server to work!!! We need to have it on the schools soon!! THANKS!
racertim is offline
Reply With Quote
View Public Profile
 
Old 04-26-2006, 12:44 PM Re: Problems connecting to external MySQL database
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
Does your externel DB allow connetions by you from anywhere?

But saying that if your DB is stored on your webserver inside your place of employment you should be able to still use localhost. If not get intouch with the mysql admin and tell him you need a network account.

If your the admin then throw some sql at your DB

I.E
GRANT ALL PRIVILEGES ON *.* TO 'you'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

Which basically says let thsi guy login from anywhere

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf

Last edited by ibbo; 04-26-2006 at 12:46 PM..
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to Problems connecting to external MySQL database
 

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.57887 seconds with 12 queries