var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Database sharing from remote server..
I want to know how I can access another database fro another site I have on another server ?
I'm presuming I would need to change "localhost", but what would I chnage it to ?
I would recommend changing it to the main IP of the remote server.
Using the hostname would be ok too but sometimes DNS problems can entail.
Would I use only the IP address, no hosting account usernames or anything else (not database username) ?
your would still need to log onto the Database
So yes you would set it up as usual only changing "localhost" to the remote server IP
There is no need to specify the hosting account on the server, just the database name, database username and the password
EDIT: IMPORTANT: Also make sure you add an access mask to allow connections from your server on the Remote SQL Server.
Thank you friend.
Only, now I don't know what access maskingis or how to achieve it.
Sorry, bit of a newbie with this stuff.
The MySQL command you need to run on your remote server is GRANT
you would use
GRANT [command list] on [database].* to [user]@[host] identified by ‘[password]’;
So to connect to a Database of "test" with the username "joe" on your server IP of "123.456.789.012" and password "test"
you would use :
GRANT SELECT, INSERT, DELETE, CREATE ON test.* TO [email protected] IDENTIFIED BY 'test';
If you have Cpanel, you can go to "Manage MySQL" and add your Server IP... which is a lot lot easier
Hope this helps
You should write this up as a how-to if it hasn't been done already.
Actually thats a good idea.
Ive noticed a lot of others confused about the GRANT/REVOKE commands.
Ill get started on it