Activates the cache for connections to upstream servers.
The connections parameter sets the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed.
Since release 3.5.0 phpMyAdmin can be configured to remember several things (sorted column $cfg['RememberSorting'], column order, and column visibility from a database table) for browsing tables. Without configuring the storage, these features still can be used, but the values will disappear after you logout.
For GET and HEAD methods, used in combination with an Range header, it can guarantee that the new ranges requested comes from the same resource than the previous one. If it doesn't match, then a 416 (Range Not Satisfiable) response is returned.
当然我这个案例中错误码是 412(通常用作 PUT 方法更新资源出错时),不过这是一个意思,符合预期。
这时你登录的话需要使用 socket 方式连入:sudo mysql --protocol=socket --socket=/var/run/mysqld/mysqld.sock,注意这里需要用 root 权限运行,保证有足够权限读取 sock 文件,不然会默认使用当前用户进行传统的 ip+port 登录,这样肯定是登录不上的。登录上去就可以改 root 密码了,正常执行ALTER USER 'root'@'localhost' IDENTIFIED BY 'test';后发现密码并没有被改变(会报 warning),观察上面的截图会发现 root 账号的认证插件用的是auth_socket,我们需要这样执行命令ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';。就能回到传统的账号密码认证了。
3. 细心的同学可能已经发现了,多了一个mysql.sys的用户,按照官方的说法这是给 DBA 使用的,防止直接使用 root 账号带来的重命名和误删账号的问题。这个用户默认有一个初始密码,但在日志里面没找到(源码编译 MySQL 5.7 后 mysql_install_db –initialize 时会把密码记录到日志中)。这里索性重新设置一个密码(ALTER USER 'mysql.sys'@'localhost' IDENTIFIED BY 'test';)。
到这儿基本上已经安装完成了,但若你细心的话会发现在启动日志里面会有一些警告:
1. TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 这个是说explicit_defaults_for_timestamp缺省值已经废弃了,需要显式的在 my.cnf 设置 explicit_defaults_for_timestamp = 1
2. [Warning] Could not increase number of max_open_files to more than 5000 (request: 65535) 这是个常见的错误,一般修改 /etc/security/limits.conf 即可,但改了之后好像不奏效。这是因为在 /lib/systemd/system/mysql.service 配置中还有参数 LimitNOFILE 限制,把这里也修改了就可以了。
最后介绍一个比较好用的命令:mysql_config_editor,解决命令行登录MySQL便捷性和安全性的问题。我们为了本地登录MySQL方便经常会写一些一键登录的小脚本。基本上都是直接执行 mysql -uroot -p'test' 命令,这样会带来一个问题,执行的命令会被记录在bash_history中,当然你也可以禁用bash_history的功能,但这样会失去一些便捷性,也不大方便追查历史的问题命令。而且在新版本中直接使用这种方式登录会有警告信息。
好久没写 css 了,百思不得其解,试过 .article-content > ol, ul、.article-content section > ol, ul 都不行,甚至怀疑同级标签也有继承的关系。后来发现其它地方会把 class 标签写两次才恍然大悟,应该是逗号「,」优先级更高一点,把选择器解析成了 .article-content ol 和 ul 两部分,所以选择器写成 .article-content ol, .article-content ul 就可以了。
看来是是环境问题(PHP 5.4)了,回过头来看那句报错,发现用户名好像被截断了(应该是xxx_user),是不是显示的问题,随便改一个用户名试试,同样报错,用户名却没有截断。这时又想了想是不是 MySQL 的版本太高(5.7.10)了。找了个 MySQL 5.5 的环境,创建相同的用户却发现报错了:String 'xxx_user' is too long for user name (should be no longer than 16)。查询 MySQL 文档发现:MySQL user names can be up to 32 characters long (16 characters before MySQL 5.7.8). https://dev.mysql.com/doc/refman/5.7/en/user-names.html
这样看来应该是老版 PHP 的 mysqli 扩展内部限定了用户名的长度,但新版的 MySQL 却可以创建更长的用户名了。知道原因了就很好办了,创建一个短用户名 OK 了。其实也是阴差阳错,因为新库是多应用共有,所以用户名创建的比较长。_(┐「ε:)_