If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Update / Insert a MYSQL Table remotely!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-26-04, 12:06
sureshbvs sureshbvs is offline
Registered User
 
Join Date: Jun 2004
Posts: 3
Thumbs up Update / Insert a MYSQL Table remotely!

Hi

I have loaded a MYSQL DATABASE in a local PC with Internet facility and Valid IP. Another software is working in a remote PC (also with Internet facility) and this software needs to Update / Insert the table of LOCAL PC Database. But now it is not updating. I understand some GRANT PRIVILEGE is needed to give for doing this work. How to do this? I am new to MYSQL.

There is no USERNAME / PASSWORD in LOCAL PC MYSQL (working as localhost, with default username ROOT).

In case of Remote PC. The domain name is : www.nmdatm2004.org
Username : eatout (and have a password too).

Please give a solution and let me know the GRANT QUERY, to make it workable.

Regards

Suresh Babu
Reply With Quote
  #2 (permalink)  
Old 06-26-04, 22:07
TK Harmon TK Harmon is offline
Registered User
 
Join Date: Jun 2004
Posts: 6
Suresh,

It depends - what are you using to connect rmotely? Is it a script (what language)? Or is "Internt facility" an application?

Let us have a little more info

TK

Last edited by TK Harmon; 06-26-04 at 23:39.
Reply With Quote
  #3 (permalink)  
Old 06-27-04, 02:07
Mughrabi Mughrabi is offline
Registered User
 
Join Date: Feb 2004
Posts: 11
Lightbulb

No mater what software you're using , the query should look like this

grant all privileges on database1.* to root@nmdatm2004.org identified by 'root_passwd' with grant option;
Reply With Quote
  #4 (permalink)  
Old 06-27-04, 03:38
sureshbvs sureshbvs is offline
Registered User
 
Join Date: Jun 2004
Posts: 3
Thumbs up

Sir,
Actually I am using PHP script to connect from Web Server to the remote PC, which is running through a CRON JOB.

I tried the option suggested by MUGRABI.

mysql> grant all privileges on hotel.* to eatout_eat2@2eatout.co.uk identified by 'xyz' with grant option;

ERROR 1044: Access denied for user: '@localhost' to database 'hotel'

I go the above error (ERROR 1044
hotel - is the name of the database in LOCAL PC
eatout_eat2 - the username of WEBSERVER DATABASE
xyz - Password of WEB SERVER DATABASE (due to security I am giving wrong password, sorry).

Suggest a solution.
Regards

Suresh Babu
Reply With Quote
  #5 (permalink)  
Old 06-27-04, 03:52
Mughrabi Mughrabi is offline
Registered User
 
Join Date: Feb 2004
Posts: 11
first , to save ur self some headaches, replace "2eatout.co.uk" with the ip of the server on which a user needs access to db , (which is the webserver in ur case),
second try to connect using this username , with a mysql tool (from webserver ), or php and print out the error , inorder for u to be able to
troubleshoot .
Reply With Quote
  #6 (permalink)  
Old 06-27-04, 05:46
sureshbvs sureshbvs is offline
Registered User
 
Join Date: Jun 2004
Posts: 3
I tried with IP address also instead of domain name, same error it is coming. Also I have loaded PREMIUM SOFT NAVICAT (MYSQL STUDIO), and I tried to connect to WEBSERVER DATABASE, and it is connnecting also. Als through the NAVICAT I tried to provide GRANT ALL Provision and it is downloading also. But I need this QUERY for doing this work in other PC's. so what to do?

Suresh
Reply With Quote
  #7 (permalink)  
Old 06-27-04, 09:44
Mughrabi Mughrabi is offline
Registered User
 
Join Date: Feb 2004
Posts: 11
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On