《Mysql学习查看mysql编码、数据表编码》要点:
本文介绍了Mysql学习查看mysql编码、数据表编码,希望对您有用。如果有疑问,可以联系我们。
导读:本节内容:mysql数据库编码,mysql表编码的查看实例.1,查看mysql的编码
mysql> show variables like character%; +-----------------...
本节内容:
mysql数据库编码,mysql表编码的查看实例.MYSQL入门
1,查看mysql的编码
MYSQL入门
mysql> show variables like 'character%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database |<span style="color:#ff0000;"> utf8 </span> |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | /u01/mysql/share/charsets/ |
+--------------------------+----------------------------+
2,查看db的编码
MYSQL入门
mysql> show create database site001;
+----------+------------------------------------------------------------------+
| Database | Create Database |
+----------+------------------------------------------------------------------+
| site001 | CREATE DATABASE `site001` /*!40100 <span style="color:#ff0000;">DEFAULT CHARACTER SET utf8</span> */ |
+----------+------------------------------------------------------------------+
1 row in set (0.00 sec)
3,查看表的编码
MYSQL入门
mysql> show create table site_user_page G;
淫乱淫乱淫乱淫乱淫乱淫乱淫乱淫乱淫乱 1. row 淫乱淫乱淫乱淫乱淫乱淫乱淫乱淫乱淫乱
Table: site_user_page
Create Table: CREATE TABLE `site_user_page` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'pk',
`gmt_create` datetime NOT NULL COMMENT '????',
`gmt_modified` datetime NOT NULL COMMENT '????',
`member_id` varchar(36) NOT NULL COMMENT 'member_id',
`page_id` varchar(20) NOT NULL COMMENT 'page_id',
`head` text COMMENT '??',
`content` text COMMENT 'content',
`fly` text COMMENT 'fly',
`foot` text COMMENT 'foot',
`instance_key` varchar(32) NOT NULL COMMENT 'instancekey',
`user_instance_key` varchar(32) NOT NULL COMMENT 'user_instance_key',
`page_type` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_userInstanceKey` (`user_instance_key`),
KEY `idx_instanceKey` (`instance_key`),
KEY `idx_userInstanceKey_pageid` (`user_instance_key`,`page_id`),
KEY `idx_memberId` (`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=101820722 <span style="color:#ff0000;">DEFAULT CHARSET=utf8</span>
1 row in set (0.00 sec)
欢迎参与《Mysql学习查看mysql编码、数据表编码》讨论,分享您的想法,维易PHP学院为您提供专业教程。
转载请注明本页网址:
http://www.vephp.com/jiaocheng/7438.html