本文最后更新于 2018年8月13日。
这是一个数据头格式与library不符,将sql驱动改为sqld驱动即可解决。
<span class="hljs-attribute" style="color: #EEDC70; word-wrap: inherit !important; word-break: inherit !important;">php</span> -i|grep Client<br>
查询当前Client 版本,结果如下:
Client API version => <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">5.6</span>
<span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">.31</span>
<br>Client API <span class="hljs-keyword" style="color: #F82375; word-wrap: inherit !important; word-break: inherit !important;">library</span> version => <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">5.6</span>
<span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">.31</span>
<br>Client API header version => <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">5.5</span>
<span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">.47</span>-MariaDB<br>Client API version => <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">5.6</span>
<span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">.31</span>
<br>
header version => 5.5.47-MariaDB版本号不一样,因此报错。
卸载安装命令(仅限PHP7.0,其他版本需要更改名字)
yum <span class="hljs-keyword" style="color: #F82375; word-wrap: inherit !important; word-break: inherit !important;">remove</span> php70w-mysql<br>yum install php70w-mysqlnd<br>systemctl restart httpd<br>systemctl restart mysqld<br>
再次查询
<span class="hljs-attribute" style="color: #EEDC70; word-wrap: inherit !important; word-break: inherit !important;">php</span> -i|grep Client<br>
结果这样
[root@centos7HPC zb_users]<span class="hljs-comment" style="color: #808080; word-wrap: inherit !important; word-break: inherit !important;"># php -i|grep Client</span>
<br>Client API library version => mysqlnd <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">5.0</span>.<span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">12</span>-dev - <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">20150407</span> - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $<br>Client API version => mysqlnd <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">5.0</span>.<span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">12</span>-dev - <span class="hljs-number" style="color: #AE87FA; word-wrap: inherit !important; word-break: inherit !important;">20150407</span> - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $<br>现在可以成功安装了<br>
附一点数据库导入心得:
导入数据库时虽然用的新数据库名,但实际还是创建的原来的数据库名,尤其是从虚拟空间导出的sql文件,不过可以通过编辑sql文件直接更改。
无特殊说明,本站文章均为原创,转载请注明出处。
本文首发于微信公众号“我的探索”ID:MyExploration