ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

connect to remote mysql server

December 01, 2010 11:28am

Subscribe [3]
  • #1 / Dec 01, 2010 11:28am

    khyqo

    6 posts

    good day everyone.. i hope i am posting my query in the right forum..

    i am developing a site and i am coding using my localhost.. but i wanted to use the database from my web server (which have already data) rather than using my localhost mysql.. are there any feature/functionality in CI that i could use? please advice..

    thanks in advance..

  • #2 / Dec 01, 2010 11:50am

    keithics

    33 posts

    You can actually work on it directly. for my website. I put something db1.variomedia.de as a host.
    It also depends if your mysql server supports remote connection.

  • #3 / Dec 01, 2010 11:57am

    khyqo

    6 posts

    i can allow my ip to access my web server.. but where do i put that? in mysql_driver.php?

  • #4 / Dec 01, 2010 11:58am

    n0xie

    1381 posts

    application/config/database.php ?

  • #5 / Dec 01, 2010 12:02pm

    khyqo

    6 posts

    this is my database.php

    $active_group = “default”;
    $active_record = TRUE;

    $db[‘default’][‘hostname’] = “localhost”;
    $db[‘default’][‘username’] = “root”;
    $db[‘default’][‘password’] = “root”;
    $db[‘default’][‘database’] = “database_one”;
    $db[‘default’][‘dbdriver’] = “mysql”;
    $db[‘default’][‘dbprefix’] = “”;
    $db[‘default’][‘pconnect’] = TRUE;
    $db[‘default’][‘db_debug’] = TRUE;
    $db[‘default’][‘cache_on’] = FALSE;
    $db[‘default’][‘cachedir’] = “”;
    $db[‘default’][‘char_set’] = “utf8”;
    $db[‘default’][‘dbcollat’] = “utf8_general_ci”;

    $db[‘alternate’][‘hostname’] = “localhost”;
    $db[‘alternate’][‘username’] = “root”;
    $db[‘alternate’][‘password’] = “root”;
    $db[‘alternate’][‘database’] = “database_two”;
    $db[‘alternate’][‘dbdriver’] = “mysql”;
    $db[‘alternate’][‘dbprefix’] = “”;
    $db[‘alternate’][‘pconnect’] = TRUE;
    $db[‘alternate’][‘db_debug’] = TRUE;
    $db[‘alternate’][‘cache_on’] = FALSE;
    $db[‘alternate’][‘cachedir’] = “”;
    $db[‘alternate’][‘char_set’] = “utf8”;
    $db[‘alternate’][‘dbcollat’] = “utf8_general_ci”;

  • #6 / Dec 01, 2010 12:03pm

    keithics

    33 posts

    application/config/database.php ?

    database config…
    🐛

  • #7 / Dec 02, 2010 4:43am

    Dennis Rasmussen

    601 posts

    I smell fail topic :<
    Just edit your database configuration and change the hostname.

    Tadaaa…...

  • #8 / Dec 02, 2010 4:48pm

    khyqo

    6 posts

    thats what i did.. i should have closed this topic yesterday.. how do i close it? :D

    anyways, thanks for the response..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases