chuushi / CoreProtect-Lookup-Web-Interface

A flexible lookup web interface for CoreProtect 2
MIT License
50 stars 14 forks source link

I'm getting this error #40

Open RehanPlayz opened 2 years ago

RehanPlayz commented 2 years ago

2005: SQLSTATE[HY000] [2005] Unknown MySQL server host '127.0.0.1:3306' (2)

'database' => [
    'server' => [
        'type'        => 'mysql',
        'path'        => '/database.db',
        'host'        => '127.0.0.1:3306',
        'database'    => 'rehanplayz_coreprotect',
        'username'    => '[Redacted]',
        'password'    => '[Redacted]',
        'flags'       => '',
        'prefix'      => 'co_',
        'preBlockName'=> true,
        'mapLink'     => 'https://localhost:8123/?worldname={world}&mapname=surface&zoom=3&x={x}&y={y}&z={z}'
    ],
],
RehanPlayz commented 2 years ago

@chuushi

RehanPlayz commented 2 years ago

Coreprotect was able to connect just fine but the web interface can't connect

RehanPlayz commented 2 years ago

I tried connecting thorough: localhost, 127.0.0.1, and 0.0.0.0 (None of the works)

RehanPlayz commented 2 years ago

The website is hosted on a different machine from the mc server so I used the direct IP in the coreprotect config to connect

dansleboby commented 2 years ago

You will need to make an SSH tunnel to get access to the local mysql of copy the DB file on your local machine, you can also edit my.ini to allow it to bind outside the 127.0.0.1 but it a bit risky to open mysql to the WWW