Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Mysql
nummell
post Oct 25 2007, 12:40 AM
Post #1


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 8-October 07
From: Portugal
Member No.: 51,339



Hi...

One of my hosts hasnīt MySQL but i need to develop a login system so I need to know if itīs possible to use a MySQL database intalled in another host...
If itīs possible can you explain me how to do it?

Thanks in advance
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Oct 25 2007, 12:46 AM
Post #2


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,378
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



Are you referring to using another hosting's SQL? For example, Hosting site B is using hosting site A's SQL?

This is called remote connecting to database and if the hosting company allows remote connection to database, then yes. But majority of hosting companies do not offer because of the security reasons.

With Trap17 hosting you are able to use Trap17 hosting as a remote database but it's at your risk. Please refer to our hosting member area for more information.
Go to the top of the page
 
+Quote Post
nummell
post Oct 25 2007, 12:59 AM
Post #3


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 8-October 07
From: Portugal
Member No.: 51,339



Thanks for the information.
I still need to know how to "call" the database...
Usualy is LOCALHOST - USERNAME - PASSWORD
How do you call a database on another host?
Go to the top of the page
 
+Quote Post
faund
post Oct 25 2007, 02:50 AM
Post #4


Advanced Member
*******

Group: Members
Posts: 128
Joined: 7-September 07
From: Ningbo, China
Member No.: 49,552



You could use the connect test code below

CODE
<?php
$link=mysql_connect('221.133.22.11','root','123456');
if(!$link) echo "connection failure";
else echo "Connection success";
mysql_close();
?>


You should replace "221.133.22.11" with your remote mysql server's IP.
"root" will be replaced with your remote mysql server's username.
"123456" will be replaced with your remote mysql server's password.

It's not a good idea to connect a remote mysql server I think, anyone of server down, your site will down, and transfer your account infomation through internet is really a dangrous action.
Go to the top of the page
 
+Quote Post
nummell
post Oct 25 2007, 11:15 PM
Post #5


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 8-October 07
From: Portugal
Member No.: 51,339



Thanks for the info...
Maybe Itīs better for me to move my other domain to trap17
Go to the top of the page
 
+Quote Post
asglu
post Apr 6 2008, 07:23 PM
Post #6


Newbie [Level 1]
*

Group: Members
Posts: 11
Joined: 6-April 08
Member No.: 60,456



here is the basic and simple php script to connect mysql database
CODE
<?php
$server = "";//database server name
$database = "";//database name
$username = "";//data base user name
$password = "";//database password
$connection = mysql_connect($server,$username,$password);//to connect the msql server
mysql_select_db($database,$connection);//to select data base
mysql_close();//close the mysql server after use
?>
Go to the top of the page
 
+Quote Post
fffanatics
post Apr 6 2008, 09:25 PM
Post #7


Privileged Member
*********

Group: [HOSTED]
Posts: 937
Joined: 14-April 05
From: West Chester, PA
Member No.: 5,636



Yeah, just use the scripts above to accomplish what you need. It is very simple since lots of hosts do not even have their own local mysql server. For instance, godaddy gives you the ip for their sql server and you have to use that instead of localhost in your script. It helps keep loads down on very popular servers and such.
Go to the top of the page
 
+Quote Post
shadowx
post Apr 6 2008, 10:02 PM
Post #8


A clever man learns from his own mistakes, a WISE man learns from those of OTHERS
*********

Group: [HOSTED]
Posts: 883
Joined: 12-April 06
From: Essex, UK
Member No.: 21,719



Well im fairly sure there are flat-file style MYSQL databases... I cant remember the name but try google...

It doesnt require a database server to run, it somehow converts the MYSQL commands (they might vary slightly from normal DB code) into file read-write commands and then uses ordinary (but encoded) files to store the data and then reads and writes to those files so it should work perfectly on your set up.

Try google for "flat file database mysql" or something similar.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Installing Mysql On Unix, Linux(2)
  2. Mysql And Sql(7)
  3. Loading File Into Blob Fields To Mysql(1)
  4. Mysql Datatype Int() Question(1)
  5. Database With Mysql++(4)
  6. Mysql Query Problems(6)
  7. Mysql-essential-5.0.51 Installion Problem(1)
  8. The Best Free Php Mysql Blog(5)


 



-