A
A
andrei20192018-07-30 08:32:23
MySQL
andrei2019, 2018-07-30 08:32:23

How to connect to Sphinx in OpenSUSE?

On Ubuntu, connecting to Sphinx with the MariaDB client worked fine: mysql -h ubuntu -P9306.
Moved to OpenSUSE 15leap. Also mysql client from Maria. The same Sphinx3.0.3 is on you:

# mysql –h opensuse –P9306
mysql  Ver 15.1 Distrib 10.2.14-MariaDB, for Linux (x86_64) using readline 5.1
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Usage: mysql [OPTIONS] [database]
...

I can't access from PHP either.
$conn = new PDO('mysql:host=opensuse;port=9306;charset=utf8','','');

PHP Fatal error:  Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /srv/www/htdocs/index.php:42
Stack trace:
#0 /srv/www/htdocs/index.php(42): PDO->__construct('mysql:host=open...', '', '')

Sphinx starts up without swearing and seems to listen normally:
tcp    LISTEN     0      5      0.0.0.0:9306               0.0.0.0:*                   users:(("searchd",pid=1763,fd=8))
tcp    LISTEN     0      5      0.0.0.0:9312               0.0.0.0:*                   users:(("searchd",pid=1763,fd=7))
tcp    LISTEN     0      80     127.0.0.1:3306               0.0.0.0:*                   users:(("mysqld",pid=3033,fd=20))

I started mysqld and connected to MariaDB with the same client:
# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.2.15-MariaDB openSUSE package
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>

But it does not cling to the Sphinx. Firewall stopped. All this on one machine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andrei2019, 2018-07-30
@andrei2019

Found a solution online! But I did not understand why it worked in Ubuntu.
mysql -P 9306 -h 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question