windows7 32bit下MySQL5.5.22安装笔记_MySQL
程序员文章站
2022-04-12 11:09:28
...
bitsCN.com
1. 准备文件 mysql解压版 下载地址ftp://ftp.iij.ad.jp/pub/db/mysql/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]下追加 ------- 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, 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. ------- ==〉看到上面类似内容说明登陆成功,此时的root帐号是没有密码的 执行命令修改密码: use mysql; update user set password=PASSWORD("这里填写你要设置的密码") where user='root'; 执行完成后退出mysql操作,然后关闭mysql服务(ctrl+C 关闭另一个命令窗口),然后重启mysql服务 作者 lotnhiro bitsCN.com
1. 准备文件 mysql解压版 下载地址ftp://ftp.iij.ad.jp/pub/db/mysql/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]下追加 ------- 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, 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. ------- ==〉看到上面类似内容说明登陆成功,此时的root帐号是没有密码的 执行命令修改密码: use mysql; update user set password=PASSWORD("这里填写你要设置的密码") where user='root'; 执行完成后退出mysql操作,然后关闭mysql服务(ctrl+C 关闭另一个命令窗口),然后重启mysql服务 作者 lotnhiro bitsCN.com
上一篇: php中关于变量定义的总结
推荐阅读
-
Linux下mysql源码安装笔记
-
windows 10 下安装mysql 5.7.17的简单笔记
-
linux下apache、mysql、php安装配置详细笔记
-
linux下apache、mysql、php安装配置详细笔记
-
Windows7下安装使用MySQL8.0.16修改密码、连接Navicat问题
-
windows7下mysql8.0.18部署安装教程图解
-
Windows7下安装使用MySQL8.0.16修改密码、连接Navicat问题
-
CentOS下 MySQL 5.5.13 CMake 安装笔记
-
ubuntu下apache+mysql+php安装笔记
-
win7下MySQL的安装配置及卸载 笔记分享