♣安装mysql两种方法

♣下载mysql5.7解压版

♣配置步骤

解决服务无法启动

♣解决乱码


1.安装mysql两种方法

  MySQL安装文件分为两种,一种是msi格式的,一种是zip格式的。如果是msi格式的可以直接点击安装,按照它给出的安装提示进行安装,一般MySQL将会安装在C:\Program Files\MySQL\MySQL Server 5.7 该目录中;zip格式是自己解压,解压缩之后其实MySQL就可以使用了,但是要进行配置。

2.下载mysql5.7解压版

   下载地址:https://dev.mysql.com/downloads/mysql/

    window安装mysql5.7解压版(解决乱码问题)

        我的安装路径是:E:\dataBase\mySql\mysql-5.7.12-winx64

         window安装mysql5.7解压版(解决乱码问题)

         配置环境变量:

         我的电脑->属性->高级->环境变量 选择PATH,在其后面添加: 你的mysql bin文件夹的路径

        ;E:\dataBase\mySql\mysql-5.7.12-winx64\bin   

3.配置步骤

        3.1配置my.ini 

           把根目录下的my-default.ini  改名  为my.ini  。然后把里边的#号去掉,配置为(注意里边的路径要改为自己的安装路径):      

 1 # For advice on how to change settings please see
 2 # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
 3 # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
 4 # *** default location during install, and will be replaced if you
 5 # *** upgrade to a newer version of MySQL.
 6 
 7 [mysqld]
 8 
 9 # Remove leading # and set to the amount of RAM for the most important data
10 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
11 # innodb_buffer_pool_size = 128M
12 
13 # Remove leading # to turn on a very important data integrity option: logging
14 # changes to the binary log between backups.
15 # log_bin
16 
17 # These are commonly set, remove the # and set as required.
18 basedir =E:\dataBase\mySql\mysql-5.7.12-winx64
19 datadir =E:\dataBase\mySql\mysql-5.7.12-winx64\data
20 port =3306
21 character-set-server=utf8
22 # server_id = .....
23 
24 
25 # Remove leading # to set options mainly useful for reporting servers.
26 # The server defaults are faster for transactions and fast SELECTs.
27 # Adjust sizes as needed, experiment to find the optimal values.
28 # join_buffer_size = 128M
29 # sort_buffer_size = 2M
30 # read_rnd_buffer_size = 2M 
31 
32 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
View Code

相关文章: