图解MYSQL的安装和数据升级

  如果你是全新安装,就可以跳过这一步啦

  找到你的Mysql的数据库目录下的 ragnarok 数据库目录,例如我的Mysql安装在

  D:\mysql 这个目录下,就到 D:\mysql\data\ 目录下找到 ragnarok 数据库目录

  把它拷贝一份到其它地方!

  [升级你的ODBC - MySQL ODBC driver ]

  首先打开你的控制面版,找到 [添加删除程序] 把旧的MySQL ODBC driver 删除

  然后安装MyODBC-3.51.11-1-win.exe

  [删除你电脑里的旧版MYSQL服务]

  如果你以前安装过旧版的,那就要看看如何完整从你的系统内删除Mysql

  在你从电脑里卸载旧的MYSQL数据库服务时

  首先先在WINDOWS服务里停掉MYSQL的服务

  再到控制面板里的增加删除程序内进行删除

  但是你并不能完整的把MYSQL服务删除

  那么就要在注册表里清除你的MYSQL服务

  有几个地方:(应该有两项,不记得啦,大家查查吧)

  1、HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL 目录删除

  2、HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL 目录删除

  3、HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL 目录删除

  如下图所示:

screen.width-461) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541395340459.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541395340459.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  清除完以后,

  还要记得把 C:\WINDOWS\my.ini 这个文件删除哦

  然后重新启动计算机

  再到你计算机服务里看一下

  是不是MYSQL服务已经不见啦,好了可以进行安装新版的MYSQL啦!

  [相关软件下载:]

  Mysql 4.1.11-win32 - For Windows ( Mysql 4.1.11-win32.exe ) -- 数据库服务

  下载

  http://down.21sun.net/webtools/mysql-4.1.11-win32.zip

  Connector/ODBC - MySQL ODBC driver ( MyODBC-3.51.11-1-win.exe ) -- 数据源

  下载

  http://down.21sun.net/webtools/MyODBC-3.51.11-1-win.exe

  MySQL Control Center ( mysqlcc-0.9.4-win32.zip ) -- 管理工具

  下载

  http://down.21sun.net/webtools/mysqlcc-0.9.4-win32.zip

  [Mysql Server 4.1.11的安装教程]

  ===============================================================================

  1、运行MYSQL Server 4.1 安装包

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130821871.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130821871.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  2、点击(Change..)选择安装路径,建议大家不要装在C盘!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130825177.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130825177.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  3、我选择了安装到D:\Mysql\目录下,然后点击OK,进入下一步安装

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130828622.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130828622.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  4、选择完安装路径以后点击Next>进入下一步操作!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130832385.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130832385.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  5、点击Install进行开始安装

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130835131.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130835131.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  6、我们看到安装进度!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130840751.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130840751.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  7、选择Skip Sign-Up 项,点击Next>继续安装!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130846704.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130846704.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  8、到这里我们安装已经完成,选上Configure the MySQL Server now后

  点击 Finish 进入Mysql的配置工作

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/2005413085553.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/2005413085553.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  9、进入Mysql的配置界面!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130858908.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130858908.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  10、选择Detailed Configuration 选择后,点击Next>进行下一步!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/200541309113.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/200541309113.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  11、选择Server Machine 然后点击Next>继续!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/2005413096642.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/2005413096642.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  12、选择Multifunctional Database 然后点击Next 继续!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130910575.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130910575.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  13、这一步默认即可(让你选择数据库文件的存放地点)建意默认!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130915778.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130915778.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  14、选上Online Transaction Processing(OLTP)然后点击Next>继续!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130917654.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130917654.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  15、如下图,继续Next>

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130920743.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130920743.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  16、选择语言的支持!默认为Standard Character Set

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130924549.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130924549.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  17、记得要选上Include Bin Directory In Windows Path 选项,继续

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130927611.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130927611.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  18、如下图,输入密码,继续Next>

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130930143.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130930143.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  19、点击Execute 开始完成配置并启动MYSQL服务!

screen.width-461) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130932478.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130932478.gif" onload="function anonymous() { if(this.width>screen.width-460)this.width=screen.width-460; }">

  20、点击Finish 完成你的Mysql的全部安装!

=700) window.open('http://www.21sun.net/bbs/UploadFile/2005-4/20054130937304.gif'); }" border=0 align=center src="http://www.21sun.net/bbs/UploadFile/2005-4/20054130937304.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">

  [恢复 cAthena Mysql 数据库的备份]

  ===============================================================================

  把你刚才备份的 ragnarok 目录,拷贝到你的Mysql数据库目录下面,即完成对Mysql版本的升级

  [安装 MySQL Control Center 来管理Mysql数据服务 ]

  ===============================================================================

  我们首先安装 mysqlcc-0.9.4-win32.zip ,想必安装大家

  都会的啦,我这里就不陈述啦,下面就看一下关于 MySQL Control Center

  的配置和管理Mysql 数据库!

  1、打开MySQL Control Center我们看到是个英文界面,下面我们就来设置

  语言包,找到Options点击里面的General Ctrl+0 这个选项,如下图

=700) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541310226966.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541310226966.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">

  2、选择Language项,选Simplified Chinese选项,然后Apply应用!

  应用以后,需要关掉MySQL Control Center 再打开,看到了吧,是

  不是我们熟悉的中文界面啦!

=700) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541310231710.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541310231710.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">

  3、下面我们就看看如何利用MySQL Control Center来管理我们的MYSQL

  首先我们建立一个服务,进来,如下图!密码你自己设置的哦,不要

  问我是多少啦!你在安装MYSQL 4.1.11时设置的那个密码!如下图填

  写,然后点添加即可!

=700) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541310234991.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541310234991.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">

  4、下面我们新增加一个root管理员,有人会问现在不是已经有一个

  啦吗,为什么还要再增加一个呀,下面我就说说为何需要增加一个

  Mysql Admin User ,在以往的mysql 4.0版本里,默认安装即会有

  四个Mysql Admin User 的帐号,分别是!

  ----------------------------------------------------------

  root@%root@localhost

  @%

  @%localhost

  -----------------------------------------------------------

  有的人会问,那这么多帐号都有什么作用呀,下面我们来讲一下关于

  MYSQL的帐号原则,我们看到root@%和root@localhost这两个帐号对比

  是不是不同,当然用法也不同,当我们在设置Mysql联接时,会需要到

  这两项就是(Server)(User);Server就是你的Mysql服务器的IP地址

  或域名或者是机器名,User 就是连接SQL数据库的帐号,如下表所示

  -----------------------------------------------------------

  帐号@服务器地址

  -----------------------------------------------------------

  root@%root@localhost

  -----------------------------------------------------------

  关健在于服务器地址,这个地方,@% 代表任意地址都可以连接,@localhost

  代表只能在本地用localhost做为地址连接,在Mysql 4.1.11版本安

  装时只有一个 root@localhost这个帐号,可以说Mysql 4.1.11版本MYSQL

  针对安全性上有所增强啦,嘿嘿~~

  假如我的MYSQL服务器,安装在 192.168.0.100 这台机器上,如果我只有

  root@localhost 这个帐号,我就只能在 192.168.0.100 地址用 localhost

  标示才能连接上MYSQL数据库;如果我里面有一个 root@% 的帐号,我可以

  用 127.0.0.1\192.168.0.100 都可以连接上数据库,所以有时我们需要

  其它机器连接时,就需要我们自己建立一个帐号啦!

  如下图,建立一个新的Mysql Admin User帐号

=700) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541310237338.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541310237338.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">

  5、输下需要建立的帐号信息,然后增加!

=700) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541310241208.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541310241208.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">

  6、看到了吗,建立一个新的MYSQL ADMIN USER帐号就完成了,当然

  你也可以建立其它名称的,不一定就是Root ,也可以针对不同的帐

  号进行附加不同的权限,这个需要你以后体会啦!

=700) window.open('http://www.791600.com/bbs/UploadFile/2005-4/200541310254609.gif'); }" border=0 align=center src="http://www.791600.com/bbs/UploadFile/2005-4/200541310254609.gif" onload="function anonymous() { if(this.width>'700')this.width='700'; }">