MYSQL Problem

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo,
    habe seit 2 Tagen einen V-Server.
    Nach der Testphase wollte ich jetzt mein richtiges Script mit MYSQL Funktionen laufen lassen.
    Jedoch entstehen jede Menge Fehler.
    Hier der erste und wahrscheinlich ausschlaggebende.


    [18:17:45] [MySQL] Error (0): Failed to connect. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).



    Benutze das MYSQL Plugin von StrickenKid.
    Auf meinem PC funktioniert es.
    Mein MYSQL basierendes LoginSystem auf einer Homepage funktioniert ohne Fehler.
    Ich schätze das es irgendwie am Plugin liegt.


    Vielleicht könnt ihr mir ja helfen.


    Mit freundlichen Grüßen
    Steph12

  • Zitat

    Mein MYSQL basierendes LoginSystem auf einer Homepage funktioniert ohne Fehler.

    Ja Mysql ist installiert und funktioniert eigentlich auch.
    Wie gesagt bei PHP funktioniert es.
    Weis gerade nicht welche Configdatei oder wo sie liegt :(



    Mit freundlichen Grüßen
    Steph12


    Edit: Mal die my.cnf (falls die zu gebrauchen ist)




    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    #
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql…ver-system-variables.html


    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port = 3306
    socket = /var/run/mysqld/mysqld.sock


    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram


    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket = /var/run/mysqld/mysqld.sock
    nice = 0


    [mysqld]
    #
    # * Basic Settings
    #
    user = mysql
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    port = 3306
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    language = /usr/share/mysql/english
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address = 127.0.0.1
    #
    # * Fine Tuning
    #
    key_buffer = 16M
    max_allowed_packet = 16M
    thread_stack = 128K
    thread_cache_size = 8
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover = BACKUP
    #max_connections = 100
    #table_cache = 64
    #thread_concurrency = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit = 1M
    query_cache_size = 16M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    #log = /var/log/mysql/mysql.log
    #
    # Error logging goes to syslog. This is a Debian improvement :)
    #
    # Here you can see queries with especially long duration
    #log_slow_queries = /var/log/mysql/mysql-slow.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    # other settings you may need to change.
    #server-id = 1
    #log_bin = /var/log/mysql/mysql-bin.log
    expire_logs_days = 10
    max_binlog_size = 100M
    #binlog_do_db = include_database_name
    #binlog_ignore_db = include_database_name
    #
    # * BerkeleyDB
    #
    # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
    skip-bdb
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    # You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
    #skip-innodb
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    # ssl-ca=/etc/mysql/cacert.pem
    # ssl-cert=/etc/mysql/server-cert.pem
    # ssl-key=/etc/mysql/server-key.pem




    [mysqldump]
    quick
    quote-names
    max_allowed_packet = 16M


    [code=sql]
    #no-auto-rehash # faster start of mysql but no tab completition


    [isamchk]
    key_buffer = 16M


    #
    # * NDB Cluster
    #
    # See /usr/share/doc/mysql-server-*/README.Debian for more information.
    #
    # The following configuration is read by the NDB Data Nodes (ndbd processes)
    # not from the NDB Management Nodes (ndb_mgmd processes).
    #
    # [MYSQL_CLUSTER]
    # ndb-connectstring=127.0.0.1



    #
    # * IMPORTANT: Additional settings that can override those from this file!
    # The files must end with '.cnf', otherwise they'll be ignored.
    #
    !includedir /etc/mysql/conf.d/




    Edit: Tabmenü wollte nicht :(

  • Um Deinen Fehler zu beheben, benötige ich mal den kompletten
    Server Log, um zu sehen, was Dein Server genau über die
    Datenbanken sagt.


    Tritt da zufällig irgend ein Fehler auf bezüglich libmysqlclient.so.15 / 16
    oder ähnliches?

  • Je nachdem welches Plugin ich benutze.
    Gibt ja 2:

    Beim ersten: Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)Beim zweiten:



    Zitat

    [00:58:32] [MySQL] Error (0): Failed to connect. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] 0 Häuser wurden geladen.

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] 0 Geschäfte wurden geladen.

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Zitat

    [00:58:32] 0 Zonen wurden geladen.

    Zitat

    [00:58:32] 1162 Objekte wurden geladen!

  • Zitat

    (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)


    Ja genau davon habe ich gesprochen und das habe ich mir schon gedacht.


    Du musst Deine libMySQL Datenbanken aktualisieren, da Dein Server
    die 16 braucht und wahrscheinlich nur die 15 installiert ist.



    Übrigens, auch eine zweite Variante wäre noch denkbar:


    Benutzt Du zufällig ein 64 bit System?


    Dann solltest Du folgendes installieren, was den Fehler beheben könnte...

    Code
    apt-get install ia32-libs
  • Ja ich verwende ein 64-Bit System.
    Habe diesen Befehl aber schon ausgeführt( apt-get install ia32-libs)!


    Hab schon gesucht aber keinen Befehl/Paketnamen gefunden für libmysql.
    Weist du zufällig wie das Paket dazu heißt?



    Mit freundlichen Grüßen
    Steph12


    Edit: Etwas hinzugefügt

  • Bin grade am suchen...
    Mal schauen, ob ich es nochmal finde.


    Ich sage Dir bescheid, im Falle ich finde es gleich noch.



    // EDIT


    Versuche bitte einfach nochmal die Static Version des
    Plugins einzubauen, da ich überzeugt bin, dass diese
    eigentlich funktionieren müsste, denn sehe bitte selbst:


    [SERVER][ LINUX ] libmysqlclient_r.so.16: cannot open shared object file: No such file or directory

    Einmal editiert, zuletzt von 4#Future ()

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Diesen Thread habe ich auch schon gelesen.
    Aber bei der Static Version kannst du ja oben gucken wie viele Fehler auftauchen.
    Also bringt das jetzt nicht so viel das ohne Veränderung nochmal zu testen.


    Mit freundlichen Grüßen
    Steph12



    Edit:

    Zitat

    Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

    Was heißt das eigentlich?
    Ich stell mir darunter vor das irgend was den Zugriff stört.



    World of Revolution - German Reallife: www.world-of-revolution.de

    Registriert euch jetzt und seit auf die BETA-Phase gespannt!

    Einmal editiert, zuletzt von Steph12 ()

  • Hast du überhaupt einen MySQL Server auf deiner Maschine drauf, und ist dieser gestartet?


    Das bedeutet, dass er nicht mal hin verbinden kann. Welche IP/Host hast du denn angegeben, worauf er sich verbinden lassen soll?
    libmysqlclient_r.so.16 und der 64 Bit Version kannst du im Moment vergessen.

  • Zum 3. mal ja ich habe MYSQL.
    PhyMyAdmin und mein PHP Login System mit MYSQL funktioniert ja !
    Gestartet ist er natürlich auch!


    #define SQL_HOST "localhost"
    #define SQL_USER "Stephsql1"
    #define SQL_PASS "*******"
    #define SQL_DB "Stephsql1"


    Mit freundlichen Grüßen
    Steph12



    Edit: Kann es sein das der einfach den falschen Pfad wählt?
    /tmp/mysql.sock


    Den gibt es überhaubt nicht!

  • Probier mal den SQL Host 127.0.0.1 anstatt localhost.


    Ansonst machst du es ganz billig:
    mkdir /var/mysql
    ln -s /tmp/mysql.sock /var/run/mysqld/mysqld.sock


    Grund:
    Das Plugin sucht in /tmp/ nach der mysql.sock, dies ist aber veraltet, und in deiner Config steht sowieso, dass diese unter /var/run/mysqld/mysqld.sock angelegt wird.


    EDIT: "ln -s" erstellt eine Verknüpfung zu der Datei mysqld.sock unter /var/run/mysqld/ her, diese Verknüpfung heißt dann mysql.sock und liegt unter /tmp
    Nur zur Erklärung.

  • Vielen Dank Grex :) :)
    Du hilfst mir echt immer weiter :)


    Mit freundlichen Grüßen
    Steph12



    Edit: Leider geht der Server jetzt aus wenn ich mich einlogge :(


    Edit2: Jetzt gings :( Hoffentlich funktioniert es jetzt so



    World of Revolution - German Reallife: www.world-of-revolution.de

    Registriert euch jetzt und seit auf die BETA-Phase gespannt!

    Einmal editiert, zuletzt von Steph12 ()