Home > Backend Development > PHP Tutorial > 求PHP脚本检测MYSQL 字符集跟端口

求PHP脚本检测MYSQL 字符集跟端口

WBOY
Release: 2016-06-13 13:15:26
Original
828 people have browsed it

求PHP脚本检测MYSQL 字符集和端口
求PHP脚本检测MYSQL 字符集和端口 在线等

------解决方案--------------------
端口:show variables like 'port';

字符集: SHOW VARIABLES LIKE 'character%' 

在用php输出即可。
------解决方案--------------------
端口能检测出来吗?
虽然 show variables like 'port'
得到的是端口,但他必须在连接到数据库以后才可以执行
而不知道端口时,是不能连接到数据库的
除非你依次尝试,遍历整个可能的端口号,直到找到数据库服务为止

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template