win8.1 MySQL安装问题

来源:互联网 发布:阿里云 ddns解析 编辑:程序博客网 时间:2024/04/28 08:38

        帮老师做asp.net项目的过程中,使用的是mysql数据库。但是由于自己刚刚安装win 8.1专业版系统,安装mysql数据库并不成功(无法启动mysql56服务)。恢复系统之后重新按章还是无法启动服务,换了个旧一点的版本安装也还是存在问题。在逼不得已的情况下,安装了mysql绿色版,使用的版本是mysql5.6.24版本。

一、在官网下载mysql的最新版本

        官网网址为:http://www.mysql.com/downloads/,我的电脑是64位的版本,所以就下载了一个对应的版本。下载之后就解压到自己自定义的文件夹就可以了。

mysql下载页面


二、修改配置文件

绿色版解压之后,在根目录中,有一个my-default.ini,这是mysql提供的一个默认的配置文件。打开这个文件,并以此为模板填充内部空缺的内容,并保存为my.ini文件。具体的my.ini文件的内容如下:


# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/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.

[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:\mysql-5.6.24-winx64"
# datadir = "D:\mysql-5.6.24-winx64\data"
# port = 3306
# server_id = MySQL56

# 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
character-set-server=utf8

[client]
loose-default-character-set = utf8     //client的编码模式最好是与server相同

[WinMySQLadmin]
Server = "D:\mysql-5.6.24-winx64\bin\mysqld.exe"


        到此为止,mysql安装的主体过程就基本结束了。我们可以通过用cmd执行mysql.exe来尝试登陆。默认登陆名是root,密码为空。


三、下载workbench

         绿色版的mysql是不配备workbench的,如果你是研究数据库的人士,长期使用cmd来调用数据库自己看了也是不舒服的。所以不如下载一个workbench链接一个数据库。下载地址和前面下载mysql绿色版是一样的,傻瓜安装就可以了。

workbench界面


四、下载connector组件

        绿色版的mysql是无法直接和visual studio相连接的,在前面的下载地址上下载一个connector组件进行连接就可以了。


0 0
原创粉丝点击