如何在64位WIN7下安装64位的解压版MySQLmysql-5.6.14

 我来答
兄弟连教育
2016-07-01 · 百度知道合伙人官方认证企业
兄弟连教育
兄弟连教育成立于2006年,11年来专注IT职业教育,是国内专业的IT技术培训学校。2016年成功挂牌新三板(股票代码:839467)市值过亿。开设专注程序员培训专注php、Java、UI、云计算、Python、HTML5、
向TA提问
展开全部
安装MySQLmysql-5.6.14可以参考如下安装步骤:

1、将解压缩后的文件放到自己想要的地方,并配置环境变量。示例中存放的目录为:F:\mysql\mysql-5.6.14-winx64

2、在环境变量中添加:MYSQL_HOME:F:\mysql\mysql-5.6.14-winx64,在path路径中加入:%MYSQL_HOME%\bin。配置环境变量不是必须的,只是为了能更方便的在命令行中使用mysql的命令行工具。

3、修改ini配置文件

5.6.14的解压缩版里有一个my-default.ini文件,copy一份改名为my.ini放在同级目录下。修改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]
loose-default-character-set=utf8
basedir = F:/mysql/mysql-5.6.14-winx64
datadir = F:/mysql/mysql-5.6.14-winx64/data
[client]
loose-default-character-set=utf8
[WinMySQLadmin]
Server=F:/mysql/mysql-5.6.14-winx64/bin/mysqld.exe
# 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
# 设置mysql的安装目录
# 设置mysql数据库的数据存放目录
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
character-set-server=utf8
# 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

4、安装服务

开始——所有程序——附件——命令提示符,右键以管理员身份运行。 输入命令:
C:\>f:
F:\>cd F:\mysql\mysql-5.6.14-winx64\bin
F:\mysql\mysql-5.6.14-winx64\bin>mysqld -install
Service successfully installed.

5、启动服务
F:\mysql\mysql-5.6.14-winx64\bin>cd\
F:\>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。

6、配置用户
还在上面的命令窗口里面,输入命令:mysql -u root -p
回车后提示输入密码。
mysql解压缩版初次安装管理员root的密码为空,因此直接再回车一次就登入mysql数据库了。

F:\>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.14 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
成功后
输入命令:use mysql;      /*使用mysql数据库*/
mysql> use mysql
Database changed
输入命令:select host,user,password from user;    /* 查看系统的账户信息 */
mysql> select host,user,password from user;
+-----------+------+----------+
| host | user | password |
+-----------+------+----------+
| localhost | root | |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | | |
+-----------+------+----------+
4 rows in set (0.00 sec)
host:代表mysql服务允许哪个IP来的请求。localhost和127.0.0.1指mysql服务所在的主机,即本地。::1是IPV6的IP地址写法,
全称为:0000:0000:0000:0000:0000:0000:0000:0001。现在都是IPV4的网络,可以不用管他。
user:指账户名称。不同的host下账户名称可以相同。
password:密码。
可以看到,默认账户里只支持本地连接,并且账户没有密码。现在的问题明确了,就是要将匿名用户删除,为root用户添加远程访问和密码,再为自己添加个人账户。指令如下:

mysql> update user set password=PASSWORD('root') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> grant all on *.* to root@'%' identify by 'root';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ident
ify by 'root'' at line 1
mysql> grant all on *.* to walle@'%' identify by '123456' with grant option;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ident
ify by '123456' with grant option' at line 1
mysql> delete from where user='';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'where
user=''' at line 1
mysql> select host,user,password from user;
+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| 127.0.0.1 | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| ::1 | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| localhost | | |
+-----------+------+-------------------------------------------+
4 rows in set (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
匿名用户
2016-07-01
展开全部
1.从网上搜索并下载好mysql-5.7.4-m14-winx64.zip。2、解压到D:/mysql.(路径自己指定)3、在D:/mysql/mysql-5.7.4-m14-winx64下新建my.ini配置文件内容如下:####################配置文件开始####################Foradviceonhowtochangesettingspleasesee#***DONOTEDITTHISFILE.It'satemplatewhichwillbecopiedtothe#***defaultlocationduringinstall,andwillbereplacedifyou#***upgradetoanewerversionofMySQL.[client]default-character-set=utf8[mysqld]port=3306basedir="D:/mysql/mysql-5.7.4-m14-winx64/"datadir="D:/mysql/mysql-5.7.4-m14-winx64/data/"tmpdir="D:/mysql/mysql-5.7.4-m14-winx64/data/"socket="D:/mysql/mysql-5.7.4-m14-winx64/data/mysql.sock"log-error="D:/mysql/mysql-5.7.4-m14-winx64/data/mysql_error.log"#server_id=2#skip-lockingmax_connections=100table_open_cache=256query_cache_size=1Mtmp_table_size=32Mthread_cache_size=8innodb_data_home_dir="D:/mysql/mysql-5.7.4-m14-winx64/data/"innodb_flush_log_at_trx_commit=1innodb_log_buffer_size=128Minnodb_buffer_pool_size=128Minnodb_log_file_size=10Minnodb_thread_concurrency=16innodb-autoextend-increment=1000join_buffer_size=128Msort_buffer_size=32Mread_rnd_buffer_size=32Mmax_allowed_packet=32Mexplicit_defaults_for_timestamp=truesql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES####################配置文件结束###################重点是以下配置,其中datadir的目录名称必须是:D:/mysql/mysql-5.7.4-m14-winx64/data/。4、在windows系统环境变量path,加入如下内容D:/mysql/mysql-5.7.4-m14-winx64/bin;(注意加分号)5、将mysql注册为windows系统服务具体操作是在命令行中执行以下命令(需要以管理员身份运行命令行):增加服务命令:mysqldinstallMySQL--defaults-file="D:/mysql/mysql-5.7.4-m14-winx64/my.ini"移除服务命令为:mysqldremove6、第5步成功后,打开系统服务管理可以看到mysql系统服务(此处需要注意):需要在mysql服务的登陆属性里配置管理员用户登陆(不配置从服务管理里启动报1035错误,在命令行启动报启动失败)在命令行启动mysql命令为:netstartmysql关闭mysql命令为:netstopmysql7、修改root的密码为123456命令行执行:mysql–urootmysql>showdatabases;mysql>usemysql;mysql>UPDATEuserSETpassword=PASSWORD('123456')WHEREuser='root';mysql>FLUSHPRIVILEGES;mysql>QUIT8、此时可以在本机上客户端连接了(本人用的是SQLyog),有个系统库叫:mysql9、远程登陆配置允许root用户在任何地方进行远程登录,并具有所有库任何操作权限,具体操作如下:1)在本机先使用root用户登录mysql:命令行执行:mysql-uroot-p输入密码(第7步中设置的密码):1234562)进行授权操作:mysql>GRANTALLPRIVILEGESON*.*TO'root'@'%'IDENTIFIEDBY'youpassword'WITHGRANTOPTION;重载授权表:mysql>FLUSHPRIVILEGES;退出mysql:quit
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
yzg001212
2016-07-01 · TA获得超过755个赞
知道小有建树答主
回答量:877
采纳率:20%
帮助的人:885万
展开全部
http://dev.mysql.com/downloads/mysql/5.6.html#downloads
登录到这个mysql官网下载64位zip安装包,然后安装就可以了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式