• define(‘DB_NAME’, ‘databasename’);

    /** MySQL database username */
    define(‘DB_USER’, ‘databaseuser’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘dbpassword’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘https://mysite.com’);

    i defined above in my wp-config.php at my local setup is i need something else to connect with as i think linode need some more things to connect to remote like private IP if yes where to use it .

    We can add the private IP as i did earlier but where to use it locally so that i can use it locally.

    Is it need ssh tunneling or ssh tunneling used the main IP of node of linode.

    Or it is need to my ip to remote access on server as i don’t have C panel how i can do it via putty or ssh.

    Thanks please help to connect

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter manish96170

    (@manish96170)

    As i see we can add our ip to bind address = our local ip (can see on whatismyipaddress dot com) Is i am right at this point but even though i am not able to connect.

    any suggestions are appreciated.

    Several things:
    – By adding a reply to your question you reduced your chance of getting any answer, to many people it would look like someone is handling the issue.
    – The browser prefix “https://” does not belong as a prefix to your database hosting machine name. Never.
    – The usual configuration is to have the database server on the same machine that is hosting the website, in this case the entry is:
    define('DB_HOST', 'localhost');
    In some unusual configurations the database is on a different machine in which case its IP address or name is put instead of localhost.
    – localhost and 127.0.0.1 are the same thing.

    Thread Starter manish96170

    (@manish96170)

    Hi

    Yes i did same but no success i am using wordpress files on local and want to update db of online version.

    i used to remove https:// , and added ip , also tried by adding domain name and hostname as well so these combinations i used i am sure that i am using right username password database name.

    It seems me i need to something on my online server so can anybody help me on this.
    Thanks For Your Response
    Sorry for the mistakes

    It seems me i need to something on my online server so can anybody help me on this.

    It is possible that they have firewall rules which block you.
    Also it is likely that your database user is configured to make local connections only, local in the sense of from the WordPress on the server to the mySQL on the same server. Check the user permissions in “phpmyadmin” on your hosting.

    Another way of updating your database is to export form your development site and import on your hosted site. If your local website is configured as “VirtualHost” this works well, much more tricky if it is just “localhost”.

    You need to add remote server IP address. You can see that in phpmyadmin.

    This is how you connect a local WP install to a remote version’s DB, assuming your remote site is using cPanel.

    – in your remote cPanel, select Remote MySQL from the Databases section
    – enter your local system’s IP address (go to Google and search on My IP) and Save
    – from your cPanel home page, copy your hosting account IP address
    – edit your local wp-config with the DB name, user and password of the remote DB you wish to connect to
    – the value to enter in the local w-config for the MySQL hostname is the IP address of your hosting account that you copied earlier, and it is ONLY the IP address – NO https:// etc.

    Just tested this with a GoDaddy shared Linux plan and a local WP install running in XAMPP on Win 10.

    Cheers!
    Lyle

    Thread Starter manish96170

    (@manish96170)

    Hi, All

    Thanks

    As i already said that i dont have cpanel so that cannot work for me another on localsite setup i dont want to do i know that procedure but i want in a way i want. Also dont have phpmyadmin

    So i think i need to follow the step of RossMitchell to see permission of user of db and firewall i can disable .
    Let me see and comeback

    Thanks

    @manish96170 – I guess the question then is, why exactly, do you wish to connect a local install to a remote DB?

    If it is just to create/update posts to the site from a local computer without logging on to the remote site, then perhaps you should look into something like Windows Live Writer (Windows) or MarsEdit for the Mac OS.

    These are the two programs that I use to create posts while offline on my own computers. When I do get to where I can be online, I simply connect and publish ??

    This has that added benefit that you always have a saved local copy of your posts ??

    Cheers!
    Lyle

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Connect local site to remote online db’ is closed to new replies.