2. 解压缩
3. 添加path环境变量,路径指向mysql所在bin目录下
4. 在主目录下创建data文件夹
5. 注册windows系统服务
新建一个my.ini文件,拷贝到c:\windows目录下,内容如下:
[client]
port=3306
default-character-set=utf8
[mysqld]
# 设置为MYSQL的安装目录
basedir=C:\_04Tools\mysql-5.7.18-winx64
# 设置为MYSQL的数据目录
datadir=C:\_04Tools\mysql-5.7.18-winx64\data
port=3306
character_set_server=utf8
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
#开启查询缓存
explicit_defaults_for_timestamp=true
需要输入时char再查询数据表如何轻松把mysql数据表对齐。只需要输入时charsetgbk就ok了简单易 *** 作,别问我怎么知道的,百度是个好东西。此外,还有一个问题就是怎么把中文正常显示。
我的可以mysql> desc studentinfo
+-------------+----------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+----------------------------+------+-----+---------+-------+
| sno | int(8) | NO | PRI | NULL | |
| sex | enum('男','女') | NO | | NULL | |
| age | int(3) | YES | | NULL | |
| identify | varchar(18) | NO | UNI | NULL | |
| tel | varchar(15) | YES | | NULL | |
| car_type | varchar(4) | NO | | NULL | |
| enroll_time | date | NO | | NULL | |
| leave_time | date | YES | | NULL | |
| scondition | enum('学习','结业','退学') | NO | | NULL | |
| s_text | text | YES | | NULL | |
+-------------+----------------------------+------+-----+---------+-------+
10 rows in set (0.00 sec)
mysql> show variables
+-----------------------------------------+---------------------------------------------------------------------
| Variable_name | Value
+-----------------------------------------+---------------------------------------------------------------------
| auto_increment_increment | 1
| auto_increment_offset | 1
| autocommit | ON
| automatic_sp_privileges | ON
| back_log | 50
| basedir | D:\Program Files\MySQL\MySQL Server 5.1\
| big_tables | OFF
| binlog_cache_size | 32768
| binlog_direct_non_transactional_updates | OFF
| binlog_format | STATEMENT
| bulk_insert_buffer_size | 8388608
| character_set_client | gbk
| character_set_connection | gbk
| character_set_database | utf8
| character_set_filesystem | binary
| character_set_results | gbk
| character_set_server | utf8
| character_set_system | utf8
| character_sets_dir | D:\Program Files\MySQL\MySQL Server 5.1\share\charsets\
| collation_connection | gbk_chinese_ci
| collation_database | utf8_general_ci
| collation_server | utf8_general_ci
| completion_type | 0
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)