首页 > 代码库 > 开发环境-Mysql

开发环境-Mysql

1.解压压缩包
2.设置环境变量(mysql \h)
MYSQL_HOME -> 修改 Path环境变量,添加 %MYSQL_HOME%\lib;
3.配置mysql服务
mysqld --install [服务名] mysql服务安装
mysqld remove mysql 服务卸载
4.mysql工具安装(sqlYog/navicat)
5.mysql一些设置操作
SHOW VARIABLES LIKE ‘character%‘;// 显示mysql字符设置
SET character_set_client=‘utf8‘;
SET character_set_connection=‘utf8‘;
SET character_set_database=‘utf8‘;
SET character_set_filesystem=‘binary‘;
SET character_set_results=‘utf8‘;
SET character_set_server=‘utf8‘;

SHOW VARIABLES LIKE ‘collation_%‘;// 显示mysql字符集设置
SET collation_connection=‘utf8_general_ci‘;
SET collation_database=‘utf8_general_ci‘;
SET collation_server=‘utf8_general_ci‘;

#设置mysql区分大小写
set lower_case_table_names=0

#my-default.ini
http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
default-character-set=utf8
init_connect = ‘SET NAMES utf8‘
[client]
default-character-set=utf8

6.mysql改密码
set password for root@localhost = password(‘root‘);

开发环境-Mysql