Home > Backend Development > PHP Tutorial > show variables在phpmyadmin 和 cls下结果不同?

show variables在phpmyadmin 和 cls下结果不同?

WBOY
Release: 2016-06-23 14:10:00
Original
878 people have browsed it

语句 show variables like 'char%';
为什么phpmyadmin 和 cls下结果不同

phpmyadmin

Variable_name	         Valuecharacter_set_client	 utf8character_set_connection utf8character_set_database	 utf8character_set_filesystem binarycharacter_set_results	 utf8character_set_server	 latin1character_set_system	 utf8character_sets_dir	 C:\Program Files\MySQL\MySQL Server 5.1\share\char...
Copy after login



cls
mysql> show variables like 'char%';+--------------------------+---------------------------------------------------------+| Variable_name            | Value                                                   |+--------------------------+---------------------------------------------------------+| character_set_client     | latin1                                                  || character_set_connection | latin1                                                  || character_set_database   | utf8                                                    || character_set_filesystem | binary                                                  || character_set_results    | latin1                                                  || character_set_server     | latin1                                                  || character_set_system     | utf8                                                    || character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.1\share\charsets\ |+--------------------------+---------------------------------------------------------+8 rows in set (0.00 sec)
Copy after login



回复讨论(解决方案)

因为 phpmyadmin 在执行 show variables like 'char%'; 前
先执行了 set names utf8

没遇到过,飘过.....

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