- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在尝试使用 mysqltuner 来了解我们的 WordPress 网站上某些问题背后可能存在的问题,但在运行它时几乎没有出现问题(主要是无法执行/返回代码:256)。
首先我们做了:
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
并执行它:
perl mysqltuner.pl
但这就是我们得到的:
>> MySQLTuner 1.6.9 - Major Hayden <major@mhtx.net>
>> 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...
我们不明白可能出现什么问题。预先感谢大家!
最佳答案
由于更改listen
端口/重命名root
用户并禁用无密码本地
登录,我遇到了同样的错误,但通过以下方式修复了它:
/path/to/mysqltuner.pl --port xxxx --user xxxx --pass xxxx
(假设localhost
没有--host
开关,端口3306
假设没有--port
> 开关)
运行mysqltuner
的更好方法是使用limited_user的一些凭据设置/root/.my.cnf
(任何名称都可以):
[client]
user=limited_user
pass=thatuserspassword
然后我就可以使用limited_user运行:
/path/to/mysqltuner.pl --port 5555 --user limit_user
limited_user 只需要以下权限:
显示数据库、锁定表、选择 *.*
&可选显示从属状态
和显示从属主机
关于MySqlTuner - 失败 : return code 256,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36501682/
询问 unrelated question我有这样的代码: public boolean equals(Object obj) { if (this == obj) retur
在我之前的一个问题中 js: Multiple return in Ternary Operator我询问了有关使用三元运算符返回多个参数的问题。但是现在参数IsActveUser boolean(t
假设我有一个带有 return 的 if 语句。从效率的角度来看,我应该使用 if(A > B): return A+1 return A-1 或 if(A > B): return
例如考虑以下代码: int main(int argc,char *argv[]) { int *p,*q; p = (int *)malloc(sizeof(int)*10); q
PyCharm 对这段代码发出警告,说最后一个返回是不可访问的: def foo(): with open(...): return 1 return 0 如果 ope
我想实现这样的目标: 如果在返回 Json 的方法中抛出异常,则返回 new Json(new { success = false, error = "unknown"}); 但如果方法返回 View
它是多余的,但我正在学习 JS,我想知道它是如何工作的。 直接从模块返回函数 let func1 = function () { let test = function () {
我不明白我应该使用什么。我有两页 - intro.jsp(1) 和 booksList.jsp(2)。我为每一页创建了一个 Controller 类。第一页有打开第二页的按钮:
我最近在 Joomla 组件(Kunena,更准确地说是 Kunena)中看到这段代码,那么使用 $this->return VS 简单的 return 语句有什么区别. 我已经用谷歌搜索了代码,但没
我的类实现了 IEnumerable。并且可以编译这两种方式来编写 GetEnumerator 方法: public IEnumerator GetEnumerator() { yield r
我只是在编码,我想到了一个简单的想法(显然是问题),如果我有一个像这样的函数: int fun1(int p){ return(p); } 我有一个这样的函数: int fun1(int p){
这个问题在这里已经有了答案: What does the comma operator do in JavaScript? (5 个答案) 关闭 9 年前。 function makeArray
假设我写了一个 for 循环,它将输出所有数字 1 到 x: x=4 for number in xrange(1,x+1): print number, #Output: 1 2 3 4 现
我最近在这个 Apache Axis tutorial example. 中看到了下面的一段代码 int main() { int status = AXIS2_SUCCESS; ax
function a(){ return{ bb:"a" } } and function a(){ return { bb:"a" } } 这两个代码有什么区别吗,如果有请
function a() { return 1; } function b() { return(1); } 我在 Chrome 的控制台中测试了上面的代码,都返回了 1。 function c()
考虑这三个函数: def my_func1(): print "Hello World" return None def my_func2(): print "Hello World"
这可能是一个愚蠢的问题,但我正在努力,如果有一种简明的方法来测试函数的返回结果,如果它不满足条件,则返回该值(即,传递它)。。现在来回答一个可能的问题,是的,我正在寻找的类似于例外提供的东西。然而,作
我正在测试一个函数,并尝试使用 return 来做什么,并在 PowerShell 5.1 和 PwSh 7.1 中偶然发现了一个奇怪的问题,即 return cmdlet似乎不适合在团体中工作: P
这个问题已经有答案了: Return in generator together with yield (2 个回答) Why can't I use yield with return? (5 个回
我是一名优秀的程序员,十分优秀!