Forum

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    June 2018
    Posts
    7

    Could not connect to mariadb server

    Running on ubuntu. Getting this error since yesterday: "Could not connect to mariadb server: Can't connect to MySQL server on '127.0.0.1' (107)". Already tried restoring an old, working database.

    ts3server.ini
    Code:
    machine_id=
    default_voice_port=9987
    voice_ip=0.0.0.0
    liscensepath=
    filetransfer_port=30033
    filetransfer_ip=0.0.0.0
    query_port=10011
    query_ip=0.0.0.0
    dbplugin=ts3db_mariadb
    dbpluginparameter=ts3db_mariadb.ini
    dbsqlpath=sql/
    dbsqlcreatepath=create_mariadb/
    logpath=logs
    logquerycommands=0
    ts3dbmaria.ini
    Code:
    [config]
    host=127.0.0.1
    port=3306
    username=teamspeak
    password=correctpassword
    database=teamspeak
    sudo netstat -tulpn
    Code:
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      713/mysqld

    sudo service mysql status
    Code:
     * /usr/bin/mysqladmin  Ver 9.1 Distrib 10.0.31-MariaDB, for debian-linux-gnu on x86_64
    Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
    
    Server version          10.0.31-MariaDB-1~precise
    Protocol version        10
    Connection              Localhost via UNIX socket
    UNIX socket             /var/run/mysqld/mysqld.sock
    Uptime:                 13 min 14 sec
    
    Threads: 1  Questions: 89  Slow queries: 0  Opens: 15  Flush tables: 1  Open tables: 78  Queries per second avg: 0.112
    mysql -u teamspeak -pcorrectpassword teamspeak works, so the password, username and database are correct. They haven't been changed for years, nor have above .ini files. Even tried to restore the database to a previous working mysqldump, but that doesn't fix it.

    TS Server 3.2.0

    Has anyone any idea how to fix this? Thanks in advance!

  2. #2
    Join Date
    May 2009
    Location
    Germany
    Posts
    5
    Hi had same issue
    i changed 127.0.0.1 to localhost and it runs.

  3. #3
    Join Date
    December 2004
    Location
    RF
    Posts
    3,006
    That's not an equivalent replacement. "localhost" means that the driver may use unix domain socket to connect instead of TCP.

  4. #4
    Join Date
    April 2011
    Location
    Germany
    Posts
    1,266
    By changing to "localhost" you will change the connection preference ... localhost is the connection preference (in that priority order) unix socket, IPv6 (::1) and last IPv4 (127.0.0.1). So it will first try socket, after that IPv6 and only if both fail IPv4.

  5. #5
    Join Date
    June 2018
    Posts
    7
    Sadly already tried that without effect

    HTML Code:
    2018-06-13 12:22:52.632262|ERROR   |DatabaseQuery |   |Could not connect to mariadb server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

  6. #6
    Join Date
    April 2011
    Location
    Germany
    Posts
    1,266
    Code:
    /tmp/mysql.sock
    is not the default socket and is also a quite unusuable location to place a db socket. So I presume a mostly misconfigured or at least damn weird configured database server. You might want to change that to a standard configuration or better a suiteable, valid und nice configuration.

    The standard for the mariaDB socket is:
    Code:
    /var/lib/mysql/mysql.sock
    Also the socket file must be "world useable" (777).

  7. #7
    Join Date
    June 2018
    Posts
    7
    Having trouble replying (clouflare autoprotect?). Trying to post this via pastebin: https://pastebin.com/t3JGS7Wy

  8. #8
    Join Date
    September 2012
    Posts
    6,076
    specify the socket in your ts3dbmaria.ini

    socket=/var/run/mysqld/mysqld.sock
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  9. #9
    Join Date
    December 2004
    Location
    RF
    Posts
    3,006
    Just /run/…
    /var/run/ is an anachronism.

  10. #10
    Join Date
    June 2018
    Posts
    7
    Still hitting the cloudflare protect. So pastebin: https://pastebin.com/raw/DpW1B6d1 Already tried restoring my latest backup from 10.2017

  11. #11
    Join Date
    September 2012
    Posts
    6,076
    Quote Originally Posted by ANR Daemon View Post
    Just /run/…
    /var/run/ is an anachronism.
    just used what OP provided, which is pretty much guaranteed to work. It works exactly the same anyway as /var/run is symlinked to /run (at least on every system I looked at), so it's effectively the same thing. No need to be anal about it.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  12. #12
    Join Date
    December 2004
    Location
    RF
    Posts
    3,006
    I'm not "anal" about it, I'm just guiding to the correct, future-proof solution.
    http://refspecs.linuxfoundation.org/...s/ch03s15.html

  13. #13
    Join Date
    June 2018
    Posts
    7
    Anyway... any idea why the db update to revision 27 fails/how to fix it?

  14. #14
    Join Date
    December 2004
    Location
    RF
    Posts
    3,006
    Posting same question in multiple topics may only speed up a moderator attention.

  15. #15
    Join Date
    June 2018
    Posts
    7
    Is this meant ironically or seriously? Always seems to me that you should keep it to one thread unless it's a different topic. Although you can also argue that this is a new topic...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Could not connect to mariadb server (root user)
    By Nikolai01 in forum Linux / FreeBSD
    Replies: 2
    Last Post: June 3rd, 2018, 06:40 PM
  2. Start server error using MariaDB
    By alienienigenagamer in forum Server Support
    Replies: 3
    Last Post: November 4th, 2017, 12:36 AM
  3. TeamSpeak³ Server MariaDB
    By hausiii in forum Linux / FreeBSD
    Replies: 2
    Last Post: March 21st, 2017, 02:59 PM
  4. [Not Supported] MariaDB update = Server crash
    By Jaegermeist0r in forum Server Support
    Replies: 1
    Last Post: October 17th, 2016, 01:00 PM
  5. MariaDB + teamspeak3 server
    By xxxedevtsrt in forum Server Support
    Replies: 5
    Last Post: July 12th, 2016, 07:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •