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 > Connecting to mysql on a remote server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-04, 15:03
dmlocke30 dmlocke30 is offline
Registered User
 
Join Date: Jul 2004
Posts: 3
Connecting to mysql on a remote server

Hi,

I wonder if someone can help me. I have created a database on my local apache server and have now dumped the .sql file into my remote server. The local database has been successfully created as all the tables and data are visible - cool!

However I have upload my new connection file with my database name, username, host name and password - which I have changed, and subseqently uploaded my files that interact with the database, I am getting a connection error.

I am sure I have changed the connection details correctly and uploaded it to the correct file on the server.

I really don't don't know where the problem is?

Can anyone help, as it is a content management system that I am trying to get to work, and it is just wasting away, not being used because I cant connect to the remote database. It definately work on my local machine with the local connection setting?

Help

David
Reply With Quote
  #2 (permalink)  
Old 07-15-04, 11:38
jake5929 jake5929 is offline
Registered User
 
Join Date: Jul 2004
Posts: 4
How are you trying to access the new database, via PHP?

If so, here's a possible situation:

You were running MySQL and PHP on the same server before, so privileges were granted in MySQL to as follows (example ID=fred):

grant all on *.* to fred@localhost identified by wilma;

This works fine when PHP and MySQL are running on the same box (localhost)

But, if you switch your database to a new machine, fred is coming in from the machine where the PHP engine is running (example, it's called phpbox). You would have to set up MySQL priviliges as follows:

grant all on *.* to fred@phpbox identified by wilma;

Of course, if you're not using PHP in your scenario, ignore this post.

Jake
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