MySQL database study notes (a) ---- MySQL 5.6.21 installation and configuration (setup version)

【statement】 

Welcome to reprint, but please keep the original source → _ → 

No. One Life: http://www.cnblogs.com/smyhvae/

Source: http://www.cnblogs.com/smyhvae/p/4026782.html

 

【text】

[Development Environment]

Physical machine Version: Win 7 Ultimate (64)

MySQL version: 5.5.40MSI Edition (64-bit)

First, the database type:

(1) relational database

(2) Object-oriented database

(3) XML database

Now the mainstream is a relational database.

 

Second, the database products:

  • There are large databases: Oracle, Sybase, DB2, SQL server
  • There are small database: MySQL, Access, etc.

Listed above databases are relational databases, Oracle, only a small part of object-oriented. MySQL's open source, free and other characteristics, suitable for the development of SMEs.

 

Third, the basic concepts of relational databases:

Relational database is a plurality of tables (table) set of data and the relationships between the tables, and the table is two-dimensional relational structure of a plurality of rows, a plurality of columns.

Figure above, the table columns are called fields (Field) , the table becomes the row record (Record) . Field is a structure of the table, the data table records.

Four, MySQL downloads:

Download the official website address: http://www.mysql.com/ :

The figure above, you can see MySQL comes in three versions: Enterprise Edition, Cluster Edition, Community Edition. Community Edition is the version we need, GPL is an open source protocol. Click on the link of the image above the red box, enter another interface:

The figure above, we have chosen the red box part of the community version for download, pop up the following interface:

Below, you can see MySQL supports many platforms:

我的操作系统是64位的,我选择对应版本(MSI版)进行下载,点击上图中红框部分的链接,进入如下界面:

上图中,点击红框部分进行下载,弹出如下界面:

上图中,我们不需要注册,点击红框部分,直接下载即可。

 

五、MySQL的安装:

双击安装包时,出现了这个错误:

好吧,没想到官网下载的软件都能出问题。算了,我还是下老版本的吧。

点击上图中红框部分,弹出如下界面:

上图中,点击红框部分,弹出如下界面:

不用注册,直接下载吧。。。

 

五、MySQL的安装:

软件下载完成后,就开始安装吧。

上图中,建议选择第二项的Custom,自定义安装。弹出如下界面:

上图中,选择合适的安装路径,点击“继续”:

之后跳出另一个对话框,是让我们安装一个可视化的工具:

上图中,我们勾选红框部分,然后点击“finish”,进行配置。

 

六、MySQL的配置:

 

 

 

上图的解释:今后在Java开发中,要对这个服务器进行访问,就要涉及到通信的协议,这里使用TCP/IP协议,此时就涉及到了端口,MySQL默认的端口号为3306,使用默认的即可。继续下一步:

 

上图中,是选择数据库的编码。第一种是拉丁文,只支持英文,不支持中文;第二种貌似是和日语有关的。这里我们选择第三种:自定义。然后将编码方式设置为:utf-8。下一步:

上图中,我们勾选“路径添加到环境变量”,然后继续:

上图中,是给root用户设置密码。这里,我将密码设置为smyh。另外,勾选“允许用户远程(网路)访问”,否则只能在本地访问,继续:

上面的勾会自动打的:

上图中,可以看到,我们的配置被写在了my.ini这个文件中了。

点击finish,完成安装。我们再到对应目录下看一下my.ini文件的内容:

  View Code

 

同时,我们在开始菜单的程序中也能看到已经安装好的程序了:

点击它,开始运行:

打开”计算机管理“可以看到MySQL的服务已启动:

同时在进程中也可以看到:

 

五、MySQL的卸载:

1、到控制面板里面先把mysql软件删除;

2、删除mysql的安装目录(如果在其他盘还有设置目录也要删除,空目录也要删除);

3、删除注册表中的以下文件:(按"Win+R"键,输入regedit,进入注册表):

  • HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL
  • HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL
  • HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL

有的话全部删除(技巧:用F3循环查找“mysql”);

4、如果是windows 7 系统,还需要找到C:\ProgramData\MYSQL将其删除;如果是XP系统,删除找到C:\Documents and Settings\All Users\Application Data\MYSQL

完成后即可再次安装,不需要重启系统。

Guess you like

Origin www.cnblogs.com/zyh0430/p/11921327.html