win7 mysql 5.7.22_windows7 32bit下MySQL5.5.22安装笔记

该教程详细介绍了在Windows环境下安装MySQL5.5的步骤,包括下载解压、设置环境变量、修改配置文件my.ini以指定数据目录和字符集,并启动MySQL服务。此外,还指导了如何设置root用户的密码并重启服务。
摘要由CSDN通过智能技术生成

1. 准备文件 mysql解压版 地址ftp://ftp.iij.ad.jp/pub/db//Downloads/MySQL-5.5/mysql-5.5.22-win32.zip2. 解压到本地目录 D:\devTools\mysql3. 把添加系统环境变量 MYSQL_HOME == D:\devTools\mysql (新建) Path == ;%MYSQL_HOME%\bin (追加)4. 修改MySQL5

1. 准备文件

mysql解压版  地址ftp://ftp.iij.ad.jp/pub/db//Downloads/MySQL-5.5/mysql-5.5.22-win32.zip

2. 解压到本地目录

D:\devTools\mysql

3. 把添加系统环境变量

MYSQL_HOME  ==> D:\devTools\mysql  (新建)

Path                ==> ;%MYSQL_HOME%\bin  (追加)

4. 修改MySQL5.5的配置文件,把my-small.ini改名为my.ini进行编辑

a)在[mysqld]下追加  www.2cto.com

-------

basedir = "d:\\devTools\\mysql"

datadir = "d:\\devTools\\mysql\\data"

character-set-server = utf8

-------

b) 在[client]下追加

-------

default-character-set = utf8

-------

5. 保存my.ini的配置, 然后打开命令行(开始菜单==>运行==>cmd )

输入: mysqld --console 然后回车将看到如下类似内容:

-------

C:\Windows\system32>mysqld --console

120410 14:25:22 [Note] Plugin 'FEDERATED' is disabled.

120410 14:25:22 InnoDB: The InnoDB memory heap is disabled

120410 14:25:22 InnoDB: Mutexes and rw_locks use Windows interlocked functions

120410 14:25:22 InnoDB: Compressed tables use zlib 1.2.3

120410 14:25:22 InnoDB: Initializing buffer pool, size = 128.0M

120410 14:25:22 InnoDB: Completed initialization of buffer pool

120410 14:25:22 InnoDB: highest supported file format is Barracuda.

120410 14:25:22  InnoDB: Waiting for the background threads to start

120410 14:25:23 InnoDB: 1.1.8 started; log sequence number 1595675

120410 14:25:23 [Note] Event Scheduler: Loaded 0 events

120410 14:25:23 [Note] mysqld: ready for connections.

Version: '5.5.22'  socket: ''  port: 3306  MySQL Community Server (GPL)

-------

==> 证明mysql服务已启动

6. 设置登陆mysql root帐号的的密码

打开新的命令行,输入 mysql -uroot 回车

-------

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.5.22 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, 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.  www.2cto.com

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

-------

==〉看到上面类似内容说明登陆成功,此时的root帐号是没有密码的

执行命令修改密码:

use mysql;

update user set password=PASSWORD("这里填写你要设置的密码") where user='root';

执行完成后退出mysql操作,然后关闭mysql服务(ctrl+C 关闭另一个命令窗口),然后重启mysql服务

作者 lotnhiro

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值