2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

SELECT * FROM config_index WHERE id=1 LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT * FROM config_index WHERE id=1 LIMIT 1
                    [1] => 2002
                    [2] => Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT * FROM config_index WHERE id=1 LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 13
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT * FROM config_index WHERE id=1 LIMIT 1
                )

        )

)
--ERROR END--2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

SELECT * FROM setari WHERE id=1 LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT * FROM setari WHERE id=1 LIMIT 1
                    [1] => 2002
                    [2] => Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT * FROM setari WHERE id=1 LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 18
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT * FROM setari WHERE id=1 LIMIT 1
                )

        )

)
--ERROR END--2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

SELECT id,nume FROM categorii

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT id,nume FROM categorii
                    [1] => 2002
                    [2] => Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT id,nume FROM categorii
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 34
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT id,nume FROM categorii
                )

        )

    [3] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 39
            [function] => get_cats
            [args] => Array
                (
                )

        )

)
--ERROR END--2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

SELECT id FROM categorii WHERE nume='jocuri arcade' LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT id FROM categorii WHERE nume='jocuri arcade' LIMIT 1
                    [1] => 2002
                    [2] => Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT id FROM categorii WHERE nume='jocuri arcade' LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 28
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT id FROM categorii WHERE nume='jocuri arcade' LIMIT 1
                )

        )

    [3] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 42
            [function] => get_cat_id
            [args] => Array
                (
                    [0] => jocuri-arcade
                )

        )

)
--ERROR END--2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

SELECT id FROM jocuri WHERE titlu='mario bros in pipe panic' LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT id FROM jocuri WHERE titlu='mario bros  in pipe panic' LIMIT 1
                    [1] => 2002
                    [2] => Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT id FROM jocuri WHERE titlu='mario bros  in pipe panic' LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 47
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT id FROM jocuri WHERE titlu='mario bros  in pipe panic' LIMIT 1
                )

        )

    [3] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 61
            [function] => get_id_joc
            [args] => Array
                (
                    [0] => mario-bros--in-pipe-panic
                    [1] => 
                )

        )

)
--ERROR END--