Strange SQL issue [solved]

The next generation of server controlling with clean and powerful user interface

Moderators: reaby, oliverde8, NADEO

mixnetwork
Posts: 65
Joined: 05 Jun 2011, 13:53
Location: Luckenwalde
Contact:

Strange SQL issue [solved]

Post by mixnetwork » 13 Dec 2016, 00:10

Hi,

Just installed server and eXpansion

changed the config like in documentation, of course with my own logins.
I get following error:
ManiaLive\Database\ConnectionException with code 0
Connect Error (2005) Unknown MySQL server host '127.0.0.1:3306' (115)

I tried also "localhost", but this does not work also
Database login and PW are correct, what could this be.
Running on Ubuntu Virtual Server

I have already 2x TM1 server running with Xaseco, no problems here with Database.
Last edited by mixnetwork on 01 Jan 2017, 23:44, edited 1 time in total.

oliverde8
Posts: 1289
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: Strange SQL issue

Post by oliverde8 » 13 Dec 2016, 07:09

Hi,

I can't really help beside asking you to check that you have configured eXpansion the same way you did XAseco. eXpansion like any other php application uses basic php mysql library, so if it works for XAseco it will work for eXpansion.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

jk66
Posts: 1
Joined: 13 Dec 2016, 09:08

Re: Strange SQL issue

Post by jk66 » 13 Dec 2016, 09:12

i have the same problem, localhost or 127.0.0.1 not work but the serverip work
i have a dedicated server with centOS and my tm2server run with xaseco without problems

mixnetwork
Posts: 65
Joined: 05 Jun 2011, 13:53
Location: Luckenwalde
Contact:

Re: Strange SQL issue

Post by mixnetwork » 13 Dec 2016, 13:06

Hi,

Very strange. I tried server ip now, but same error. HE always says unknown MySql Host.
Could it be that the files having perhaps wrong rights or owner?

I also get the message that te server is running behinnd a NAT, but it is not. TM1 server is running without problems also visible onn INET. Perhps ist has something to do with this. I have no idea now what i can try or change

Here is my eXpansion config ini
server.host = '127.0.0.1'
server.port = 5010 ----> this is correct, i changed this
server.user = 'SuperAdmin'
server.password = 'mypassword'

; when a connection can't be established after the given amount
; of time, it will timeout and manialive will shutdown.
server.timeout = 5

; how many errors before quitting the ManiaLive process
config.maxErrorCount = 30

;------------------
; Database
;------------------
database.enable = true

; Connection configuration
database.host = '127.0.0.1'
database.port = 3306
database.username = 'xpansion_'
database.password = 'mypassword'
database.database = 'xpansion_'

mixnetwork
Posts: 65
Joined: 05 Jun 2011, 13:53
Location: Luckenwalde
Contact:

Re: Strange SQL issue

Post by mixnetwork » 13 Dec 2016, 13:40

Whe i start eXpansion with run_console, this error appears:

root@h2623122:/home/maniaplanet/expansion# ./run_console

_| _| _| _| _|
_|_| _|_| _|_|_| _|_|_| _|_|_| _| _| _| _|_|
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_|_|_|
_| _| _| _| _| _| _| _| _| _| _| _| _| _|
_| _| _|_|_| _| _| _| _|_|_| _|_|_|_| _| _| _|_|_|
-----------------------------------------------------
PHP Environment Compatibility Test
-----------------------------------------------------
PHP 5.3.1 or newer -> required -> [ Yes ] 5.5.9-1ubuntu4.20
Standard PHP Library -> required -> [ Yes ]
JSON -> required -> [ Yes ]
cURL with SSL -> required -> [ Yes ] 7.35.0 (with OpenSSL/1.0.1f)
MySQL -> optional -> [ Yes ]
MySQLI -> optional -> [ Yes ]
SQLite3 -> optional -> [ Yes ]
-----------------------------------------------------
Running ManiaLive 4.0.0...
[PluginHandler] Start plugin load process:

Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)
Runtime error: Connect Error (2005) Unknown MySQL server host
'127.0.0.1:3306' (115)

[PluginHandler] All registered plugins have been loaded
[13:39:42] Map change: Speed tech #1 -> ZrT_Speed1 (2 laps edition)

reaby
Posts: 911
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Strange SQL issue

Post by reaby » 13 Dec 2016, 14:46

Searching internet with the exact error messages says:
This is usually the case when name resolving doesn't work on the host. If your connect destination is always the same, you might want to use its IP address for connecting instead.
- source: http://stackoverflow.com/questions/8938 ... erver-host

You could try, perhaps ifconfig, and see your eth0 ip4-address and connect mysql using the external ip address.
Though better way would be to fix the name resolving issue and use the connection with loopback adapter to localhost, as if this is the issue.

mixnetwork
Posts: 65
Joined: 05 Jun 2011, 13:53
Location: Luckenwalde
Contact:

Re: Strange SQL issue

Post by mixnetwork » 13 Dec 2016, 14:48

I tried this already / http://stackoverflow.com/questions/8938 ... erver-host) same error, before i posted this question i already tried more solutions i found in internet, nothing helped.

This is result of ipconfig:

*Edited out ifconfig result*

I will try xaseco2 now annd check if i get same errors here. I will Post result after its running
Last edited by reaby on 13 Dec 2016, 14:58, edited 1 time in total.
Reason: edit out ifconfig resutl after seeing.

reaby
Posts: 911
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Strange SQL issue

Post by reaby » 13 Dec 2016, 14:59

Ok, ok, looks like our way of connecting mysqli on php5 has minor problem (code vice)
I'll fix this soonish.

reaby
Posts: 911
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Strange SQL issue

Post by reaby » 13 Dec 2016, 15:21

I pushed a fix to dev, see https://forum.maniaplanet.com/viewtopic ... 18&t=38544 how to switch for development branch. Fix will be available later for stable-channel.

You could also try commenting out the port from the config file, putting ; before the line.
It most likely will also fix the issue. So if it works, no need to switch for dev.

mixnetwork
Posts: 65
Joined: 05 Jun 2011, 13:53
Location: Luckenwalde
Contact:

Re: Strange SQL issue

Post by mixnetwork » 13 Dec 2016, 15:33

I commented out Port 3306, same issue, so does not work eather

Post Reply

Return to “eXpansion”

Who is online

Users browsing this forum: No registered users and 1 guest