cant' connect database to my CODIGLINATOR 3 project
samsuddin03
FREEOP

10 months ago

"Hello, my web application needs to connect to an external MySQL database. The connection is being blocked. Could you please ensure your firewall allows outgoing TCP traffic to the hostname shuttle.proxy.rlwy.net on port 17464?"

getting this error{

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers

Filename: mysqli/mysqli_driver.php

Line Number: 211

Backtrace:

File: /var/www/html/index.php

Line: 320

Function: require_once

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers

Filename: mysqli/mysqli_driver.php

Line Number: 211

Backtrace:

File: /var/www/html/index.php

Line: 320

Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/html/system/core/Exceptions.php:272)

Filename: core/Common.php

Line Number: 571

Backtrace:

File: /var/www/html/index.php

Line: 320

Function: require_once

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: core/CodeIgniter.php

Line Number: 519

}

my db array{

$db['default'] = array(
    'dsn'      => '',
    // Hostname should NOT include the port number.
    'hostname' => 'shuttle.proxy.rlwy.net',
    'username' => 'root',
    'password' => '<password>',
    'database' => 'railway',
    'dbdriver' => 'mysqli',
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt'  => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE,
    // The correct port from Railway goes here.
    'port'     => 17464,
);
}
$10 Bounty

3 Replies

Railway
BOT

10 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


10 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 10 months ago


smolpaw
HOBBY

10 months ago

It seems there's some issues in your code, shuttle.proxy.rlwy.net:17464 is perfectly accessible publicly.


phoenixauro
HOBBY

10 months ago

It looks like you might be using a old version of php

Try changing

'char_set' => 'utf8mb4',

'dbcollat' => 'utf8mb4_general_ci',

The other option is to update your php. By the way which version of php are you using?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...