2016-04-08 13 views
0

Wir versuchen mit mysqltuner eine Art Vision zu haben, was die Probleme hinter einigen Problemen auf unserer Wordpress-Website sein könnten, aber haben einige Probleme beim Ausführen (meistens fehlgeschlagen) Code: 256).MySqlTuner - Failed: Rückgabecode 256

Zuerst wir haben:

wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

und führen Sie es mit:

perl mysqltuner.pl

aber das ist, was wir bekommen:

>> MySQLTuner 1.6.9 - Major Hayden <[email protected]> 
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/ 
>> Run with '--help' for additional options and output filtering 

[--] Skipped version check for MySQLTuner script 
[!!] failed to execute: SELECT VERSION() 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: SHOW /*!50000 GLOBAL */ VARIABLES 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: SHOW /*!50000 GLOBAL */ STATUS 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: SHOW ENGINES 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: SHOW SLAVE STATUS\G 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: SHOW SLAVE HOSTS 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: \s 
[!!] FAIL Execute SQL/return code: 256 
Use of uninitialized value $myvar{"version"} in pattern match (m//) at 
    mysqltuner.pl line 1526 (#1) 
    (W uninitialized) An undefined value was used as if it were already 
    defined. It was interpreted as a "" or a 0, but maybe it was a mistake. 
    To suppress this warning assign a defined value to your variables. 

    To help you figure out what was undefined, perl will try to tell you the 
    name of the variable (if any) that was undefined. In some cases it cannot 
    do this, so it also tells you what operation you used the undefined value 
    in. Note, however, that perl optimizes your program and the operation 
    displayed in the warning may not necessarily appear literally in your 
    program. For example, "that $foo" is usually optimized into "that " 
    . $foo, and the warning will refer to the concatenation (.) operator, 
    even though there is no . in your program. 

Use of uninitialized value $mysqlvermajor in numeric gt (>) at mysqltuner.pl 
    line 1552 (#1) 
Use of uninitialized value $mysqlvermajor in numeric eq (==) at mysqltuner.pl 
    line 1552 (#1) 
Use of uninitialized value $myvar{"version"} in concatenation (.) or string at 
    mysqltuner.pl line 1531 (#1) 
[!!] Your MySQL version is EOL software! Upgrade soon! 
[OK] Operating on 64-bit architecture 

-------- Storage Engine Statistics ------------------------------------------- 
[!!] failed to execute: SHOW DATABASES 
[!!] FAIL Execute SQL/return code: 256 
[--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster 
[OK] Total fragmented tables: 0 
[!!] failed to execute: SELECT ~0 
[!!] FAIL Execute SQL/return code: 256 

-------- Security Recommendations ------------------------------------------- 
Use of uninitialized value $myvar{"version"} in pattern match (m//) at 
    mysqltuner.pl line 1345 (#1) 
[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE TRIM(USER) = '' OR USER IS NULL 
[!!] FAIL Execute SQL/return code: 256 
[OK] There are no anonymous accounts for any database users 
[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE (password = '' OR password IS NULL) AND plugin NOT IN ('unix_socket', 'win_socket') 
[!!] FAIL Execute SQL/return code: 256 
[OK] All database users have passwords assigned 
[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE CAST(password as Binary) = PASSWORD(user) OR CAST(password as Binary) = PASSWORD(UPPER(user)) OR CAST(password as Binary) = PASSWORD(UPPER(LEFT(User, 1)) + SUBSTRING(User, 2, LENGTH(User))) 
[!!] FAIL Execute SQL/return code: 256 
[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE HOST='%' 
[!!] FAIL Execute SQL/return code: 256 
[!!] There is no basic password file list! 

-------- CVE Security Recommendations --------------------------------------- 
[--] Skipped due to --cvefile option undefined 
Use of uninitialized value $mystat{"Questions"} in numeric lt (<) at 
    mysqltuner.pl line 1868 (#1) 
[!!] Your server has not answered any queries - cannot continue... 

Wir verstehen nicht, Was könnte das Problem sein. Vielen Dank im Voraus!

+0

Sieht aus wie Sie ungültige Anmeldeinformationen angegeben. Hast du irgendwelche Zugangsdaten festgelegt? Warum glauben Sie auch, dass ein mysql-Tuner-Skript Probleme im Zusammenhang mit WordPress erkennen kann? – Mjh

+0

Sehr geehrte @ Mjh vielen Dank für Ihre schnelle Antwort. Wir führen mysqltuner als root aus, wir wurden nicht nach Anmeldeinformationen gefragt. Wir denken nicht, dass mysqltuner Wordpress-Probleme erkennen kann, aber wir untersuchen viele Variablen wie: php-fpm langsame Logs, mysql langsame Logs und wir wollten auch mit mysqltuner nachsehen, ob es eine Fehlkonfiguration gibt. – Lightbox

+0

Ich habe versucht, es mit zu starten: 'perl mysqltuner.pl - Host localhost - Benutzer root' und die erste Zeile Ausgabe ist' [-] Ausführen von Tests auf localhost: 3306 [OK] Angemeldet mit Anmeldeinformationen übergeben in der Befehlszeile'so sieht es gut aus, aber es gibt alle diese gescheiterten Statistiken – Lightbox

Antwort

0

hatte ich den gleichen Fehler aufgrund der listen Port zu ändern/die root Benutzer & Deaktivierung passwordless local Logins Umbenennungs aber fixiert es mit:

/path/to/mysqltuner.pl --port xxxx --user xxxx --pass xxxx

(localhost ohne --host Schalter & Port angenommen wird 3306 wird angenommen, ohne einen Schalter)

Ein besserer Weg zu laufen mysqltuner ist Setup ein /root/.my.cnf mit einigen Anmeldeinformationen für ein limited_user (irgendein Name funktioniert): war

[client] 
user=limited_user 
pass=thatuserspassword 

ich mit einem limited_user dann in der Lage zu laufen:

/path/to/mysqltuner.pl --port 5555 --user limited_user

Die limited_user braucht nur Berechtigungen:

SHOW DATABASES, LOCK TABLES, SELECT ON *.*

& optional SHOW SLAVE STATUS & SHOW SLAVE HOSTS