windows 7 32 or 64bit 下 MySQL 5.5 安装笔记

1. 准备文件
   mysql 5.5 解压版(绿色版) 下载地址    

   http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.30-win32.zip       (32 bit)

   http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.30-winx64.zip      (64 bit)

                  
2. 解压到本地目录
   D:\devTools\mysql

3. 把MySql添加到系统环境变量
   MYSQL_HOME  ==>    D:\devTools\mysql  (新建)
   Path                   ==>    ;%MYSQL_HOME%\bin  (追加)

4. 修改MySQL5.5的配置文件,把my-small.ini(我用的是my-large.ini)改名为my.ini进行编辑
   a). 在[client]下追加

#设置mysql客户端的字符集
default-character-set = utf8

    b). 在[mysqld]下追加

#设置mysql的安装目录
basedir = D:\DevTools\mysql
#设置mysql数据库的数据存放目录,必须是data或者\xxx-data
datadir = D:\DevTools\mysql\data
#设置服务器段的字符集
character_set_server = utf8


5. 保存my.ini的配置, 然后打开命令行(开始菜单==>运行==>cmd )
   输入: mysqld --console  然后回车将看到如下类似内容:

C:\Users\Lstoryc>mysqld --console
130405 15:22:50 [Note] Plugin 'FEDERATED' is disabled.
130405 15:22:50 InnoDB: The InnoDB memory heap is disabled
130405 15:22:50 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130405 15:22:50 InnoDB: Compressed tables use zlib 1.2.3
130405 15:22:50 InnoDB: Initializing buffer pool, size = 128.0M
130405 15:22:50 InnoDB: Completed initialization of buffer pool
130405 15:22:50 InnoDB: highest supported file format is Barracuda.
130405 15:22:51  InnoDB: Waiting for the background threads to start
130405 15:22:52 InnoDB: 5.5.30 started; log sequence number 2537522
130405 15:22:52 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130405 15:22:52 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130405 15:22:52 [Note] Server socket created on IP: '0.0.0.0'.
130405 15:22:52 [Note] Event Scheduler: Loaded 0 events
130405 15:22:52 [Note] mysqld: ready for connections.
Version: '5.5.30-log'  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.30-log 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.

mysql>

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

   use mysql;  

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

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

 
Translate
From:—Detect language—AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKannadaKoreanLaoLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTamilTeluguThaiTurkishUkrainianUrduVietnameseWelshYiddish
From: Detect language
 
 
To:English—AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBulgarianCatalanChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKannadaKoreanLaoLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTamilTeluguThaiTurkishUkrainianUrduVietnameseWelshYiddish
To: English
 
English
Spanish
French
Translate text or webpage
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.30' socket: '' port: 3306 MySQL Community Server (GPL)
 
 
Type text or a website address or translate a document.
Cancel
 
 
English
Spanish
Arabic
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.30' socket: '' port: 3306 MySQL Community Server (GPL)
 
 
Alpha
 
 

Dictionary

Would you mind answering some questions to help improve translation quality?
Drag and drop file or link here to translate the document or web page.
Drag and drop link here to translate the web page.
We do not support the type of file you drop. Please try other file types.
We do not support the type of link you drop. Please try link of other types.
Turn off instant translationAbout Google TranslateMobilePrivacyHelpSend feedback

相关推荐