Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

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:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old May 8th, 2002, 12:46 PM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Unhappy can i do this?

I am confused. I have a client who is good to me and has given me the permission to use his database ccount. But I have a problem Now. How I will be able to access database account of a site say www.onesite.com to www.secondsite.com

I know there is a way. But I am unable to find Please help.
__________________
Kumar Chetan
-----
7+ Yrs of PHP/MySQL/JS/CSS/HTML/XHTML
_SelfProcclaimedGuru
To err is human. To blame your computer for your mistakes is even more human, it is downright natural.

Reply With Quote
  #2  
Old May 8th, 2002, 08:34 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 76
Send a message via AIM to Hero Zzyzzx
Well, this is very easy to do with perl and DBI, you just need to specify what host in your connect() statement.

Oh wait, what's that your sig says?

Reply With Quote
  #3  
Old May 10th, 2002, 12:45 PM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Can I do this with PHP?

My question is now that can I do this with PHP?
If yes then how?
regarding my Signature. some of senior in forums used it . I tried and found one similar to mine and adopted it. U can also get it. And I am really inetrested in Learning Perl,C and C++. I ahve just learned PHP/MySQL/Little bit of(ASP)/HTML,JavaScript and Flash/Photoshop/Gimp and Can Use Linux
Perl is high on my list and I want to Master it.

Reply With Quote
  #4  
Old May 23rd, 2002, 02:08 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
actually I tried this and failed badly
PHP Code:
 mysql_connect("www.a.com""myusername""mypassword")
        or die(
"Could not connect");
    
mysql_select_db("mydatabase") or die("Could not select database"); 


Now actually i have a site with mysql support and it uses mere 1% of its MySQL quotta. I want to use rest 99% on my another site. The problem is how come I connect to the server.
(Due to some known/unknown reasons I am not mentioning my username passwords kind of things)

Please help me.

Reply With Quote
  #5  
Old May 23rd, 2002, 12:12 PM
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 2 m 4 sec
Reputation Power: 43
Generally, when you connect to MySQL on a remote server, you would want to connect to the remote IP address, rather than the website domain name. Also, MySQL has to be configured to allow remote access by this specific user.

Thirdly, when using PHP to connect to MySQL and do queries, etc... it never hurts to actually get the error message, instead of just to echo some text:
PHP Code:
 mysql_connect("xxx.xxx.xxx.xxx""myusername""mypassword")
        or die(
"Could not connect" mysql_error());
    
mysql_select_db("mydatabase") or die(mysql_error); 

Now, if you get an error message, it might help explain the problem. I have left the "Could not connect" in there for a reason. Now, if you try to connect, and you have the wrong IP address, of course you will get no MySQL error at all, just the phrase "Could not connect". If you actually do manage to connect, but your username/password is wrong, or you don't have permission to access, the MySQL error message should explain this.

Since this is a specific question, not a general one about database design, etc... you should go to the MySQL forum or the PHP forum for more help.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #6  
Old May 23rd, 2002, 08:11 PM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Unhappy again

I got following error very first time i tried this and again when i tried using IP

Warning: Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (111) in /home/myfolder/dbconnstr.php on line 2

Warning: MySQL Connection Failed: Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (111) in /home/myfolder/dbconnstr.php on line 2
Could not connectCan't connect to MySQL server on 'XXX.XXX.XXX.XXX' (111)

and i used this code
PHP Code:
<?php
mysql_connect
("XXX.XXX.XXX.XXX""myusername""mypassword")
        or die(
"Could not connect" mysql_error());
    
mysql_select_db("bonn") or die(mysql_error);
?>


I think It is due to rights. May be i don't have remote access permissions. I will look into mysql manual to check what permissions I have got.

Thanx for help.
(Can I move my thread to another forum)

Reply With Quote
  #7  
Old June 20th, 2002, 06:57 AM
heatherhainey heatherhainey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Bracknell
Posts: 4 heatherhainey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation linking database to HTML

Hi, Shelda

I was wondering if you knew an easy way to link to a ms access query from an html page?

Reply With Quote
  #8  
Old June 21st, 2002, 07:29 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
may be a form will do

Simply a form will do. May be there is another way but I surely Don't know and is unable to find.

Reply With Quote
  #9  
Old June 24th, 2002, 03:05 PM
heatherhainey heatherhainey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Bracknell
Posts: 4 heatherhainey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

Cheers Shelda

Reply With Quote
  #10  
Old June 25th, 2002, 06:17 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Angry My ID is Shleda not Shelda

When shalespere said whats in the name he had no Email ID or domain name. I do have one.
My ID is Shleda not Shelda

Thanx

Reply With Quote
  #11  
Old June 25th, 2002, 09:37 AM
heatherhainey heatherhainey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Bracknell
Posts: 4 heatherhainey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

sorry shleda

Reply With Quote
  #12  
Old July 16th, 2002, 04:10 AM
heatherhainey heatherhainey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Bracknell
Posts: 4 heatherhainey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy me again!

I can't work out how to link to the form!!

PLEASE help/advise

Reply With Quote
  #13  
Old July 16th, 2002, 11:01 AM
mrTed's Avatar
mrTed mrTed is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: a northern town
Posts: 74 mrTed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 49 sec
Reputation Power: 7
heatherhainey,

You would have probably been better off creating a new post with a bit more information about your specific problem or needs, but I will tag on to this one...

In order to connect to an access db, from a web page, you will need to use a server side scripting language, such as vbscript with a compatible web server, such as IIS, to create a web page to include the neccessary data connection and query functions to enable you to retrieve information from access and format it to the required output.

The actual mechanics of this process are really out of the scope of a simple post, but I can offer some advice on sites to visit to read up on the technologies mentioned and to provide some tutorials to assist in getting you started down the right road.

4guysfromrolla
webmonkey
aspfree
asp101

There are loads of resources on just these few sites, so they should answer most of your questions. Once you get working, if you have any problems, just ask, but please read the forum guidelines before posting.

Hope this helps.

Regards, Ed.
__________________
/* measure twice, cut once */

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > can i do this?


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