Skip to content

2005: SQLSTATE[HY000] [2005] Unknown MySQL server host '192.168.2.201:3306' (0) #42

@valenvaio

Description

@valenvaio

Hello.
When I connect to BD, I get this error:

2005: SQLSTATE[HY000] [2005] Unknown MySQL server host '192.168.2.201:3306' (0)

The error is similar if you try to log in through the console with the address and port. As below:

mysql -u MineFS_UltraPunishments -p -h 192.168.2.201:3306
2005: SQLSTATE[HY000] [2005] Unknown MySQL server host '192.168.2.201:3306' (0)

As for this, everything works correctly:

mysql -u MineFS_UltraPunishments -p -h 192.168.2.201
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 454
Server version: 10.5.15-MariaDB-0+deb11u1 Debian 11

I suspect the problem is related to changes in PDO or explicitly specifying a port. Maybe you need to fix something in your code. If I don't specify port in host parameter in config file then it just show error:
Unknown error occured.

PHP 5.6.40-0+deb8u12 (cli) (built: Jun 28 2020 09:37:30)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions