Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't connect to some MySQL server

Comments in 'Plugin Development' started by mamayadesu, Dec 12, 2015.

  1. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Hello. I have dedicated server in my house (OS Debian 7) and I installed test server. I writting plugin which requests MySQL connection.

    For example, my IP-address: 1.2.3.4

    Username and database name on MySQL server which located on hosting expamplehost.ru (it's for example too): vh1234_me

    Database name on local MySQL server: lkdev and username root

    MySQL server of examplehost.ru: db03.examplehost.ru

    First try:
    Config
    Error:
    What file?!


    Second try:
    Config
    Error:
    Pay attention that plugin TRYING TO CONNECT TO MY MYSQL SERVER, but not db03.examplehost.ru!! Why?!

    Some code:
    PHP:
    $cfg $this->config->getAll();
    $db = new \MySQLi($cfg['mysql_host'], $cfg['mysql_user'], $cfg['mysql_pass'], $cfg['mysql_base']); // here error
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    Second try: your MySQL Hoster (MySQL community) does this... use another MySQL Hoster, it happened to me.
  3. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Do you mean that MySQL server of my hoster just redirected me to me?
  4. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
  5. xpyctum
    Offline

    xpyctum Active Member Plugin Developer

    Joined:
    Jan 13, 2014
    Posts:
    292
    Plugins:
    4
    Minecraft User:
    tylerdisney
    try connect to other mysql database
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder

Share This Page

Advertisement