Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6565785
  • 博文数量: 1005
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13071
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1005)

文章存档

2020年(2)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: Mysql/postgreSQL

2015-07-16 16:31:15


今天在官网上下载了一份编译好的mysql安装文件(mysql-5.6.25-win32.zip),这个解压后是没有exe安装文件的,平时
在windows下都习惯了直接运行安装文件,点击下一步的这样安装方式,下面跟大家演示下在没有安装文件的情况下如何
安装mysql.

1.解压缩zip文件并进入到bin目录,安装mysql服务

C:\Users\hxl>F:\learning\mysql\mysql-5.6.25-win32\bin\mysqld.exe install MySQL --defaults-file="F:\learning\mysql\mysql-5.6.25-win32\my.ini"
Service successfully installed.

我这里指定了启动的配置文件my.ini.

2.将mysql的bin目录加入到path环境变量


3.使用root用户登录到mysql
这里root用户初始是没有密码的
C:\Users\hxl>mysql -h localhost -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.25 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, 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.


4.登录进入查看下目前的已经存在的用户
C:\Users\hxl>mysql -h localhost -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.25 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, 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.


5.修改root用户的密码
SET SQL_SAFE_UPDATES = 0;
update mysql.user set password=password('mysql') where user='root';
flush privileges;

6.退出后重新登录
C:\Users\hxl>mysql -h localhost -uroot -pmysql


7.创建相应的用户
grant ALL on *.* to 'root'@'192.168.50.%' identified by 'mysql' WITH GRANT OPTION;

这样192.168.50网络段的机器就可以登陆了.


-- The End --

阅读(3360) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~