Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Connecting To Remote Database


I'm passing in the ip address of the server, my userid and password, but I get back my userid appended with my local machine name (or maybe it's the local domain, not sure) and it fails to authenticate? Is there any way to override this appending of domain?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Connecting To Remote Database
I'm using MAMP on a MacBook Pro. The only database connection I've been able to write that doesn't return an error message is on the database "test" that's installed by default:

$link = mysql_connect ("localhost" , "USERNAME", "") or die(mysql_error());
mysql_select_db ("test", $link) or die(mysql_error());
...where USERNAME is a username I created and accidentally applied to all my databases. Anyway, I assumed I could use the database "test," since I can at least connect to it.

But my queries all display error messages, even after I copy the tables they reference into the database test. Finally, I wrote a very simple query:

$Geog = mysql_fetch_assoc(mysql_query("SELECT * FROM gw_geog_gw"));
But I still get the following error message:

Quote:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Users/MyName/Sites/Geobop/Files/World.php on line 7

Does that mean I'm not even connected to the database "test"?



Connecting To A Remote Database....please Help
I'm trying to connect to a remote database, but am not sure how to do that (ie what command I should use in the Terminal). I have a php file that gives me all of the details:
<?
Database Details ----#

$host = "**.**.**.***";
$dbname = "**************";
$dbuser = "**************";
$dbpass = "**************";


Paths Used in Codeing ---#

$root_path = "/home/software/public_html/**************/";
$http_path = "http://www.webaddress.com/**************/";

?>

Connecting To Remote Database Via MySQL Administrator
I have used Sql Server and other databases extensively. I have the following questions.

1. I need to connect / manage a SQL database located on a remote web server runnin Linux. My workstation is running Windows XP. I understand that this is what MySQL Administrator is for. Is this correct?

2. Can I run both MySQL and SQL Server on my Windows XP machine?

3. What one book would be the most helpful to help me get a basic table setup?

Remote Connecting
The admin on my work server won't give me access to the mysql control panel. So what I'm thinking is using my yahoo mysql database instead.
What would I replace for localhost?

$oConn = mysql_connect("localhost", "user", "pass");

Second question, would yahoo allow remote connects?
Third question, will the queries run slowly when remote connecting?


Connecting To A Remote DB
I am running some website on fedora with VMWARE and my main OS is windows server 2003. I am trying to use db on the windows server but whenever I try to connect to it from fedora   I get bug messages.

"Warning !  [2003] - Can't connect to MySQL server on 'ep038' (13)
Server unavailable. Is your MySQL server started ?"

I am sure that the server is started and running on port 3306.
I am sure of the hostname.
I can ping the hostname from fedora so it IS accessible.
I am sure of the login and password (I set them myself).
The weird thing is that when I run a tcpdump, apparently fedora doesnt even try to connect to the remote host database.

Connecting From Remote Computer
the database is on host xxx.xxx.xxx.333, Im connecting from xxx.xxx.xxx.222
In the 'user' table in the 'mysql' database on 333 i have a user called 'wordpress'. There are numerouse entries for this user, each has a different host, they are...

%
xxx.xxx.xxx.222
localhost

They all have the same password.

I try and connect and get Access denied for user 'wordpress'@'xxx.xxx.xxx.222' (using password: YES)

I then try a mysql command on the 333 server to set permissions for user 'wordpress' on database 'wordpress' like this...

grant select,insert,update, delete on wordpress.* to wordpress@'xxx.xxx.xxx.222' IDENTIFIED BY 'myPassword';

...but it says that is doesnt match any rows in the user table.

They are both windows machines.

Connecting To A Remote Host
I'm developing a PHP script to update a table on a remote machine. I can connect easy enough but only if I add the % wildcard as a host - to my mind this makes things less secure. How can I get mysql to accept connections from my machine bearing in mind i'm on dial up.

Connecting To A Remote Server
not 100% sure which forum this should go in.. if it is in the wrong forum i am sorry.

i have just got my ubuntu box working as a server at home with dynamic dns. i have still got my website on another server. i have taken all my DB;s across to my server and want the old server to update my new one so there is only one set of data to deal with.

my issue is how do i do this? so i started with started with a simple file that connects to ponywars.com with user name and password. Then realized that i should add the user in with external hosts. i did this in phpmyadmin with user name, host being *.* and setting the password and giving it ALL access to make sure i not missed something.

but when i ran this from the old server it just hang for ages then said:

Warning: mysql_connect(): Lost connection to MySQL server during query in /home/ghoxmfjz/public_html/test.php on line 7
cant conect to ponywars.com

so i tried it the other way around to connect to happygolucky.me.uk and get the script to run. this worked fine. so i can only think its a number of things.

i tested to see if my ubuntu box was listening on 3306 which it seemed to be.

i think i have added the user in correctly but not 100% sure on that one, seemed to have.

is the php page understanding how to connect to dynamic dns, cant see why not as the rest of the site works, ssh works, vpn works. as i understand it i have set up a dmz which forwards it everything to the server.

sorry i have not given more examples etc not sure what people need to help, so any all helps suggestions, flames etc are all welcome.

Connecting To Remote MySQL Problem
I set up a linux server for Apache, PHP and MySQL last night.

A problem remains. I can't connect to MYSQL with MySQL Administrator running on another machine. The error says I cannot connect 'hostnamt' of the machine I am on.

I can connect via command line on the linux server, and I have added entries in the user table specifying host as '*' with the account I am trying to use.

I flushed privileges and even rebooted the machine.

Is there some global setting that I must change to allow remote connections?


Connecting To Remote Mysql Using Mysqladmin
I think Idid this before but cannot remember what i did. I want to use mysql admin to connect to remote mysql server as localhost so I can set server side features without having to be on the mysql server itself. I remember something in the way of "sip networking" option or something like this.

Connecting To A Remote MySQL Server
I havn't done this before and i'm not sure how to do it. I have another computer on a LAN that is running a mysql server and is the machine that is also running the intranet server which i am working on. What i want to know is how to connect to this server from my MySQL console so i can administer the databases without having to be in the main machine.

I thought it would be as simple as using the IP address but this doesn't seem to do it. Can i connect annonymously like i can from the host or do i have to have a user account setup?

Connecting Remote Server In Mysql
Waht is the way to connect the remote database in mysql? right now i am connecting it with localhost as server name but if i want to connect other datasource it showing the error datasource not found.

Connecting To Remote MYSql Server
I want to connect to a remote mysql server from command line. I don't have a mysql client installed on my local machine from which i want to connect to my Data base server.

Connecting To Mysql Using Phpmydmin From Remote Location
I just installed PHP 4.3.9, MySQL 4.0.2 and PHPMyAdmin 2.6.0-pl3 on our
intranet server (Win2k3 running IIS). I also have a similar setup on my
local machine (http://localhost/phpmyadmin).

Everything seems normal when I work on the server machine (also known
as web-nt with IP xxx.xxx.xx.xx), but when I try connecting to the
MySQL database on the server from my local machine
(http://web-nt/phpmyadmin), two things happen:

1. If I user 'localhost' in the phpmyadmin config file on the server,
it opens up properly but obviously all the images are looking at
http://localhost/phpmyadmin... etc, which is on my machine.

2. If I use the IP address on the config file, which seems to be the
better method, I get the following error: #1045 - Access denied for
user: 'root@web-nt.acorn.com' (Using password: YES)

Connecting To A Database?!?!?!
Ive only ever developed locally on my machine and thats why i dont have a clue how to do this!

Im trying to connect to a database online using mysql via the command line. I have a https address, a username and a password.

How the hell do i connect? Ive searched the web but i cant find an answer!

Also once im in i really need to make a backup of the database. Any chance anyone could tell me how to do this. I can do it through phpmyadmin but i dont have that where i am right now.

Connecting To Own PC Database
i dont know how it works when using your own PC to do database connections, so i am seeking your guidance on this question i recieved...

I am having great difficulty in setting up a data base on my PC

I have XAMPP with Apaache and MySql running

I have specified my username and password in
C:apachefriendsxamppphpMyAdminconfig.inc.php

my .php file is in
C:apachefriendsxampphtdocs

Using this code to connect...

<?php

// set your infomation.
$dbhost='localhost';
$dbusername='myusername';
$dbuserpass='myuserpass';
$dbname='test';

// connect to the mysql database server.
$...........................................................

Connecting To Database
i am able to connect to mysql database located at localhost:3306 inside tomcat. But i wanna do it in stand alone command line java program.

this is what my code looks like:

com.mysql.jdbc.jdbc2.optional.MysqlDataSource d = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();

Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, provider);
ctx = new InitialContext(prop);

ctx.bind("jdbc:mysql://localhost:3306/bsidb", d);

// where provider is a string equal to "com.sun.jndi.fscontext.RefFSContextFactory"
// and bsidb is my database name

when i do the look-up it successfully returns the datasource.
and when i do getconnection
it returns a connection to the datasource.

the problem is when i do query... it returns an SQLException: No database selected

i am not using any config files because as i've said, i will do the connection using stand alone java program.
i use mysql4.1 and mysql-connector-java-3.0.16-ga-bin.jar, fscontext.jar are in my classpath.

Connecting To Database
I have everything made and ready to go on my website and eveything, but I cannot get it my site to connect to the database. Is my "pages.php" wrong or do I have to do something to connect to the database? If it's my .php problem, how do I fix it?

Connecting To SQL Database Using Dev-C++
I'm trying to connect to a database using Dev-C++. If anyone could tell me what headers and code I need for this to work in windows it would be much appreciated.

Connecting To Database
Ive only started using MySQL this week and fraid im getting stuck on the basics! Im using the mysql server from a localhost and having problems connecting to the database. (im using a php programme for the mysql queries)

I can connect to mysql itself if i use the default settings: mysql_connect("localhost")

But when i try to connect to my database i keep getting the same error messages:
"Access denied for user: '@localhost' (Using password: NO)"

Ive tried creating a new user in MySQL and granting privileges such as:
GRANT ALL PRIVILEGES ON my_database.* TO user@'%' IDENTIFIED BY 'passw';

When i change the connect settings to: mysql_connect("localhost", "user", "passw")
then i dont connect to mysql, but get an error message saying:
"MySQL connection failed: Access denied for user: 'user@localhost' (Using password: YES)"

Connecting To Database
I'm trying to install osCommerce and going through the install process.

I'm getting the following error:

Database Import

A test connection made to the database was NOT successful.

The error message returned is:

Client does not support authentication protocol requested by server; consider upgrading MySQL client

Can anyone shed some light. Please keep in mind that I have full access to the database and can make any changes need.

Connecting To A Outside Database
I have an account at hostultra, but they have no MySQl for free. I got two free database from freesql.org, but they do not provide hosting. You can only connect to thier database from another host. I don't know how to do that. This is the information that I recieved for my MySQL account:

Database xtremegamer99 created
The permissions have been set on xtremegamer99
You should now be able to connect to:
www.freesql.org
port 3306
as user XtremeGamer99

I have tried this, but it didn't work:
<?php

// Connect to the database server
$connect= @mysql_connect('freesql.org:3306', 'XtremeGamer99', 'PASSWORD') or die ('Unable to connect to the MySQL database at this time.' );
// Select the database
@mysql_select_db('xtremegamer99', $connect) or die('Unable to locate the cheats database at this time.' );
?>

It gives me the die() for mysql_connect.

Connecting To Database
I just downloaded mysql 4.1. When I open my sql from programs it asks for password (root pass) and then I created new database(abc) and created table(bcd). Now I am trying to connect to database and select from the table, I keep getting. "Access denied for user ''@'localhost' (using password: NO) ".After I installed mysql, I logged in using root, and password I created new user called "test" and granted permission on abc. Thats the user I am using to connect to"abc".

Connecting To My Database
I have set up a Database, and i'm trying to install "Vwar" on my website, it asks for my "Database Server" and username and password, my problem is, i don't know what my Database Server would be, i have pictures of what the sites look like here

http://img.photobucket.com/albums/v457/Epicsoldier/Database.jpg
http://img.photobucket.com/albums/v457/Epicsoldier/VwarProb.jpg

Error Connecting To Database
i have installed Apache 2.0 and php 5.0.3 on to my machine which is Windows XP SP2. i can get these to work, the problem is when i install mysql it won't let me connect to my database. i keep getting this error:

Access denied for user 'ODBC'@'localhost' (using password: NO)

I have it working perfectly on Windows 2000 SP4 but cant get it to work on XP.

Connecting To Database Over Network
I have a couple computers under one domain. I installed a MySQL database on my secondary computer and want to be able to access the information from that database on my primary computer.

Both computers are able to share files, no problem there, but when I try to connect to my secondary computer from my primary, it times out and says "Can't connect to mysql server on 'second computer';"

I had this working before but for some reason I can't get it to work now. Any ideas of what I'm missing here?

Also I'm using MySQLcc so it makes it a little easier for me. I've even created a second user account for the MySQL database on my secondary computer so I'm not trying to connect to through the root user.

(For example purpose, my secondary is called second and primary is call first...)

From my primary computer, I try to connect using this..

Hostname: second
User: user1
password: ****

And it times out when I try this. If I put this into my secondary computer it connects no problem.

Connecting To Test Database
I just downloaded and installed MySQL database server and admin client. I believe there is a test database installed with MySQL by default.

Is this correct? And if so - how can I connect to the database so I can perform queries on it to familiarize myself with the product?

Command line is ok - or if there is a GUI way to do it with the Admin client or another tool that would be good to know.

Connecting To MySQL Database
I have a windows program that retrieves and stores information into a mysql database. I ran this program a couple of months ago without a problem but now when I try to run it I cannot connect to my database.

What all do I need to make a windows program connect to a mysql database?

So far I have downloaded the MyODBC driver. Also I am able to connect to the database via webpages.

Is there anything else that I would need besides that MyODBC driver? I do have the right port(s) open also...

VB6 - Connecting To A MySQL Database
I know how to connect to and access MS Access databases with VB6, but I'd really rather use MySQL. Can anyone tell me where I might be able to find a VB6 code example of how to connect & access a MySQL database?

Connecting To A MySQL Database
I'm trying to connect to a database from an ASP.NET page with VB.NET scripting on it. How can I do this? More specifically, what's the VB.NET code for connecting to a database?

Connecting To A Database Using WAMP
I'm currently using WAMP to work on existing website and database material. I downloaded the required website, but it didn't run without the database online, so I dumped a copy of the database to my hard drive and imported into phpMyAdmin, but the website still doesn't connect to the database with the address 'localhost'. What would I use? Where do I connect to the database I imported in phpMyAdmin. Here's the code for connecting as well as the error message.

// CODE
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"

$hostname_systemDB = "localhost";
$database_systemDB = "myDatabase";
$username_systemDB = "user";
$password_systemDB = "pass";

$systemDB = mysql_pconnect($hostname_systemDB, $username_systemDB, $password_systemDB) or trigger_error(mysql_error(),E_USER_ERROR);
?>

// ERROR MESSAGE
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'eid'@'localhost' (using password: YES)

Connecting To The Database On The Server
I have MySQL 4.1 on our Windows 2000 server.I do not have any local GUI tool to build a database on my Windows 2000 workstation.

Do I use the DOS command window to create my database on the server from my workstation? If so how do I do this?

Connecting To Mysql Database
I have an application that connects to a mysql database I have running on my local machine with the connection string "jdbc:mysql://localmachinename/dbname", it connects to the dbase when I am not connected to the internet but when I am connected to the internet it gives the message "Access denied for user '@%' to database". Could anyone give me a clue as to what I may have done wrong?
Secondly, I would like the database to be accessible to another user via the internet

Triggers To A Remote Database
We make use of a PACS (Picture Archiving and Communication System) and
system to store DICOM (Digital Imaging and Communication in Medicine)
images (like CT scans, MR images etc.) in our Oncology Center. This PACS
system uses mysql as it's native database, in which it stores certain
data as date and time of the examination, it uses InnoDB tables.

We are building another application around it, which will use data from
the PACS tables and will hold additional data in a seperate database in
it's own tables.

Every study has it's own unique identifier which is stored in the PACS
database. Additional data is stored in the additional database, under
the same unique identifier to be able to keep track of the data and link
it to each other.

Now I would like to know if it is possible to add a trigger to the PACS
database which will delete the related information in the additional
database if a record in the PACS database is dropped. This trigger will
have to delete the records in the additional tables before dropping the
data in it's own database, so we can maintain a more compact database
and don't store data which we cannot link to the PACS system anymore.

Remote Database Issue
I am trying to setup Joomla with the following setup.

Web server 192.168.99.80-82 Joomla is specifically at 192.168.99.82
MySQL server 192.168.99.90

I used MySQL Administrator to setup user account which I will call test. Then I right clicked the user and selected Add host from which user can connect. I then typed in 192.168.99.82. I had issues so I also added .80.

I then created a database called Joomla and then gave user test full rights to this database. I also opened port 3306 on software firewall. Then I shut off firewall.

Tried to install Joomla, but I get error when connecting to database.

I loaded MySQL Administrator on web server and I am able to connect to MySQL.

Remote Table In A Database
is it possible to create remote virtual tables in mysql? By that I mean
if it is possible to define a table, which actually resides on a remote
mysql server, but which can be accessed and addressed as if the table
would be on the local database.

My intention is to move one table to a remote host, but to be able to
address the table as if it was still on the same machine.

So for example:

SELECT m.header, m.body, m.from, m.to FROM users u, messages m WHERE
u.login=m.login;

would still work, even though the table "users" resides in the database
"moon" on a different host, than the table "message", which resides on
the localhost in the database "alltables".

The problem I'm trying to solve is: I have to webapplications, which
both have a table, which stores login information. Those tables have to
be combined into one and have to be put on one of the hosts only.

One of the application will access the remote user table for logins.
Since many of the SELECTS of this application contain joins like the
example above I'm looking for a way in which I do not have to modify
the selects but can move the login table to a different machine.

Remote Database Updating
I am working on an internet enabled sensor device project. I have a small microcontroller device that is connected to a sensor device. I want this device to dial the ISP and post its readings each day. I would like to know if anyone might have any suggestions on how this could be done.

Once the unit logs onto the server how might I code it to access the data area and post its reading. Also can this even be done. I mean does the microcontroller have to have a special database driver to access the remote database?

Remote Connection To Database
i have a web-hosted website and i need it to connect to my mysql database is there anyway i could set this up.

Selecting From A Remote Database
I would like to create a stored procedure that could select from a remote database, can i do that with MySQL?

Administrate A Remote Database
How is it possible to administrate a database placed on a remote server, without having access to it's desktop ?When i use the MySql adminstrator program it disables some of the setting, and says it has to bee a localhost connection.I would like to install the dataabase on a server, and afterward just use clients to administrate through.hope someone can explane the setup.

Remote MySQL Database
I have a MySQL Server in a Windows Box. How can I connect to the server
from another windows box using ODBC?

Strange Problem With Connecting To Database
I've installed new server and transferred databases from my home computer to this server. I have no problems with connecting to server's database from my home computer (with MySQL Query Browser), but I can't connect to database from PHP script, placed on same server.

I get this error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'login'@'host' (using password: YES) in /home/user/script.php on line 20
Could not connect: Access denied for user 'login'@'host' (using password: YES)

PHP code is:

$conn = mysql_connect("server's ip:3306", "login", "pass") or die('Could not connect: ' . mysql_error());
mysql_select_db("database", $conn);

Fatal Error When Connecting To Database
when I load setup.php in my browser I get the following error:

Fatal error: Call to undefined function mysql_connect() in C:Program FilesApache GroupApache2 estconn.php on line 7

I don't know how to identify the problem. It could be my username is wrong (root), but maybe it's something else.

403 Error Connecting To Database From Dreamweaver MX '04
I've been thrown somewhat unwillinging into the use of databases and MySQL, and now I'm stuck.

I'm making a blog. I have an article from Adobe.com that explains most of it. Everything with MySQL, MySQL Administrator and Apache setup went OK (as far as I can tell), but when I try to set up the database connection from within Dreamweaver (under the Applications/Databases tab) I get a 403:Forbidden error when i click "test" to connect to the server.

Can anyone tell me, as simply as possible (I'm a copywriter, not an IT specialist!!!), what went wrong adn how to fix it?

Connecting To Mysql Database Usin Vb
I am developing a payrol system using mysql and visual basic. i have no idea as to how to connect the two. can anyoneb help please. i am working on windows

Accessing Remote MySQL Database
Is it possible to access remote MySQL databases?

I manage several sites and I will soon be building a tool that can track all of them, and it would be really convenient if I could somehow access all of the databases from one remote site.

Connect To Remote Database(MySQL)
is there some sort of setting I need to turn on where I can access the database from another server. So instead of using "localhost" I can use the actual server IP address.

And just for future reference, is this how you set up a application server connecting to a database server?

Database Synchronisation On Two Remote Sites
I am considering the possibility of trying to keep a user table synchronised on two different sites. This is not something i've done before so i'm looking for any tips that might help me on my way.

Basically I was thinking of:

- scheduling php script to connect to both databases via cron to update the table at regular intervals
- generating an xml feed and doing the same thing

Both methods would potentially involve storing a pointer to only read and write the new rows, although perhaps I could use DATETIME to also copy accounts that have been updated since last run.

Probably biggest concern is:
- security... operating in a way that the data is private. The most sensitive data is hashed passwords and postal addresses, I don't think it would be appropriate to not somehow protect this info during transfers. I'm not sure whether SSL is an option (should be) but possibly I was thinking of creating some kind of token system.

- bandwidth. both sites should be fine resource wise but due to my lack of experience in these matters I don't really know what the performance hit will be, and I would like to run the script very often

As far as I know alot of big sites (for example hotel booking engines) use xml in the background to share info but I really have no idea how it all works.

Query Database From Remote Location.
I have a database sitting on my db server, which is part of my office network (which has a domain controller). Access to the outside world is via a router, which is well locked down.

Currently, remote users access the database front end via Terminal Services but this is only a method of accessing an application stored and running on the Database Server.
What I want to do is allow access to the database from a server, which is located in another building (another part of the country). This is essentially an inter/intranet server.

What is the best way for me to get this external server to be able to query my database server?


Copyright © 2005-08 www.BigResource.com, All rights reserved