Answer the question
In order to leave comments, you need to log in
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]
...
$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...', '', '')
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))
# 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)]>
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question