mysql 5.7.13安装

来源:互联网 发布:常州软件开发公司 编辑:程序博客网 时间:2024/06/06 03:50

安装多次均失败,原因竟是MYSQL服务名称不能含有数字!!!

1.复制my-defualt.ini文件改名为my.ini (my-defualt.ini可以删除)

2.my.ini 简单配置信息

# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the# *** default location during install, and will be replaced if you# *** upgrade to a newer version of MySQL.[client]  port=3306  default-character-set=utf8  [mysql]default-character-set=utf8[mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin# These are commonly set, remove the # and set as required. basedir = d:/Program Files/phpStudy/MySQL57/ datadir = d:/Program Files/phpStudy/MySQL57/Data/ port = 3306explicit_defaults_for_timestamp = true  # server_id = .....#服务端使用的字符集默认为8比特编码的latin1字符集  character-set-server=utf8  collation-server=utf8_general_ci  default-storage-engine=MyISAM# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 


3.配置环境变量

新增系统环境变量 MYSQL_HOME;写入值E:\tools\MySQL-5.7.14-win32

在path中中增加;%MYSQL_HOME%\bin;

4.初始化mysql服务

cmd

mysqld -install mysql名

5.初始化data文件包

mysqld --initialize --user=mysql --console

记录最后打印的密码,用于修改密码

net start mysql名

6.修改密码

执行 mysql -u root -p

输入上面打印的密码

7.修改密码 

set password = password('123');

8.刷新权限

flush privileges;

9.退出

quit



0 0
原创粉丝点击