Page 1 of 1

different databases problem

PostPosted: 04. November 2015 19:44
by maniaxgr
Hi there guys, i am new with these things and i was wondering if you can help me out.
I have 2 game servers in my home and i have successfully installed vhost in one computer for both servers and the sites working good but it doesn`t read the database from the second server(statistic)
is there a way to make it read 2 different databases?

Re: different databases problem

PostPosted: 04. November 2015 23:19
by Altrea
Hi,

sorry but your information are that much unspecific that it is impossible to give you any answer.
Additionally i am not sure if i understand correct how your environment looks like and how this is all connected.

best wishes,
Altrea

Re: different databases problem

PostPosted: 04. November 2015 23:39
by maniaxgr
i need to setup xampp to read 2 databases in different computers.
xampp is installed in one computer and running both sites(vhost) but it cannot read the remote database(sql) from the second computer

Re: different databases problem

PostPosted: 05. November 2015 00:00
by Altrea
Then you should analyse the Database response you get. There are so much possible problems that can occure.
Can you not reach the database server? Can you not login? Can you not found the database with this name? ...

Re: different databases problem

PostPosted: 05. November 2015 00:18
by maniaxgr
How can i see database responce?Sry i am really new to this..
As it seems database cannot be reached by remote!
Is vhost configurations wrong or has to do anything from the template itself?

Re: different databases problem

PostPosted: 05. November 2015 00:27
by Altrea
apache virtual host is a way for apache to separate a request by IP, Port or domainname to different ressources like as there are multiple Webservers.
But if i understand you correct you are trying to reach an external database from the computer vhost is configured. So for this environment vhost is completely independend.

How you get to the database response depends how you are trying to connect to the database. If this is a php script then there are php functions to get to the response messages.

Re: different databases problem

PostPosted: 05. November 2015 00:34
by maniaxgr
Correct,let me give an example > 1 game server in your house,one game server in my house and xampp on mine,vhost is working both site but i need to make the site that belongs to your game server to read the database from your pc.(top players,rankings etc.)
I am using mu core with xampp,so i have to config mu core and not vhost on xampp or i have to make php from scratch?

Re: different databases problem

PostPosted: 05. November 2015 11:15
by Nobbie
"Xampp" does not connect to databases, you have a completely wrong understanding.

Your own program (PHP script?) connects to a database (i.e. to a MySQL Server) and this is done with a mysql_connect() (or mysqli_connect()). This is part of your own PHP Script. And the very first parameter is the desired Server, where the database is running, in many cases you simply have to provide the LAN IP of the PC, where MySQL is running. Thats it.

Re: different databases problem

PostPosted: 05. November 2015 14:26
by maniaxgr
    <?
    /*------------------------------------------*\
    | Server Databases: |
    | |
    | 0 : MuOnline [database] |
    | 1 : MuOnline and Me_Muonline [databases] |
    \*------------------------------------------*/
    /**
    * @+===========================================================================+
    * @¦ MuCore 1.0.8 English. ¦
    * @¦ Credits: Isumeru & MaryJo ¦
    * @¦ +=======================================================================+ ¦
    * @¦ ¦ "He who Copy/Pastes Shall Inherit My Mistakes But Not My Knowledge" ¦ ¦
    * @¦ +=======================================================================+ ¦
    * @¦ Official Site: http://bizarre-networks.com ¦
    * @+===========================================================================+
    * @¦ Our Allied Site: http://chileplanet.org ¦
    * @+===========================================================================+
    */

    $core['server_use_2_db'] = "0";

    ##############################################




    /*-------------------------------------*\
    | MUCore SQL Connection Type: |
    | |
    | MSSQL : Connect using mssql_conect() |
    | ODBC : Connect using odbc |
    \*-------------------------------------*/

    $core['connection_type'] = "MSSQL";

    #########################################




    /*--------------------------------------------------*\
    | MuOnline Database Connection Settings |
    | |
    | $core['db_host'] : Database host address |
    | $core['db_name'] : Database name |
    | $core['db_use'] : SQL Authentication user |
    | $core['db_password'] : SQL Authentication password |
    \*--------------------------------------------------*/

    $core['db_host'] = "local ip";

    $core['db_name'] = "MuOnline";

    $core['db_user']= "sa";

    $core['db_password'] = "***********";

    ######################################################




    /*------------------------------------------------------------------*\
    | NOTE: |
    | Edit this only if $core['server_use_2_db'] value is set to 1, |
    | this mean your server use MuOnline and Me_MuOnline databases. |
    | |
    | Me_MuOnline Database Connection Settings |
    | |
    | $core['db_host2'] : Database host address |
    | $core['db_name2'] : Database name |
    | $core['db_use2'] : SQL Authentication user |
    | $core['db_password2'] : SQL Authentication password |
    \*------------------------------------------------------------------*/

    $core['db_host2'] = "127.0.0.1";

    $core['db_name2'] = "MuOnline";

    $core['db_user2']= "sa";

    $core['db_password2'] = "SQL-Pass";

    ######################################################################




    /*-------------------------------------------------*\
    | MUCore Admin Control Panel: |
    | |
    | $core['admin_username'] : Administrator user |
    | $core['admin_password'] : Administrator password |
    \*-------------------------------------------------*/

    $core['admin_username'] = user';

    $core['admin_password'] = '********';

    #####################################################




    /*-----------------------------------------------------*\
    | MUCore's MUCoins SQL Table Settings: |
    | |
    | MU_COINS_TABLE : MUCoins table name |
    | MU_COINS_COLUMN : MUCoins (Credits) column name |
    | MU_COINS_USERID_COLUMN : MUCoins User ID column name |
    \*-----------------------------------------------------*/

    define('MU_COINS_TABLE','memb_credits');

    define('MU_COINS_COLUMN','credits');

    define('MU_COINS_USERID_COLUMN','memb___id');

    define('MU_SCOINS_TABLE','memb_scredits');

    define('MU_SCOINS_COLUMN','scredits');

    define('MU_SCOINS_USERID_COLUMN','memb___sid');

    #########################################################




    /*--------------------------------------*\
    | MUCore Debug Settings: |
    | |
    | 1 : Debug enabled |
    | 0 : Debug disabled |
    | |
    | Note: Enable debug only if necessary. |
    \*--------------------------------------*/

    $core['debug'] = 0;

    ##########################################
    /**
    * @+===========================================================================+
    * @¦ MuCore 1.0.8 English. ¦
    * @¦ Credits: Isumeru & MaryJo ¦
    * @¦ +=======================================================================+ ¦
    * @¦ ¦ "He who Copy/Pastes Shall Inherit My Mistakes But Not My Knowledge" ¦ ¦
    * @¦ +=======================================================================+ ¦
    * @¦ Official Site: http://bizarre-networks.com ¦
    * @+===========================================================================+
    * @¦ Our Allied Site: http://chileplanet.org ¦
    * @+===========================================================================+
    */
    ?>

This is my php inside xampp.no mater what setting i have use its has not establish a connection to database!

Re: different databases problem

PostPosted: 05. November 2015 14:37
by Nobbie
Sorry, this is NOT a help forum for that kind of software. If you have questions to that software, you should ask in their support board.

Anyway, as far as i see, the software expects to connect to a MSSQL Database (what is Microsoft Database), that is not part of Xampp. Sorry, but you are totally wrong here. I cannot tell you how to connect to that database, i even dont know any userid, no password and no database.

Re: different databases problem

PostPosted: 05. November 2015 16:00
by maniaxgr
Ok thanks for the help mate.As i write in first post i dont know to much either of xampp or mu core and i thought i should ask a bit!!
User name pass etc i have hide them for obvious reasons.Anyway thanks again for helping