MySql安装过程0

合集下载

MySQL5.6版本安装及配置过程

MySQL5.6版本安装及配置过程

编辑者:Vocabulary下面详细介绍5.6版本MySQL的下载、安装及配置过程。

图1.1 MySQL5.6目前针对不同用户,MySQL提供了2个不同的版本:MySQL Community Server:社区版,该版本完全免费,但是官方不提供技术支持。

MySQL Enterprise Server:企业版,它能够高性价比的为企业提供数据仓库应用,支持ACID事物处理,提供完整的提交、回滚、崩溃恢复和行级锁定功能。

但是该版本需付费使用,官方提供电话及文档等技术支持。

目前最新的MySQL版本为MySQL 5.6,可以在官方网站/downloads/下载该软件。

下图1.2所示的MySQL官网上单击图片上的“Download”超链接或点击左边标记处,然后按照提示一步步操作就可以将MySQL软件下载到本地计算机中了。

注意这里我们选择的是数据库版本是“Windows (x86, 32-bit), MSI Installer”,如下图1.3所示。

图1.2 MySQL官方网站图1.3 选择MySQL版本当点击download后会弹出如下页面:注:下载MySql要求注册:<用户可注册或不注册>,如果不想注册就点击左下角标记处—点击后就弹出如图中下载提示->点击保存文件开始下载。

MySQL下载完成后,找到下载到本地的文件,按照下面所示的步骤双击进行安装:步骤1:双击MySQL安装程序(mysql-installer-community-5.6.10.1)会弹出如下图1.4所示:图1.4 MySQL欢迎界面步骤2:单击图1.4中的“Install MySQL Products”文字,会弹出的用户许可证协议窗口,如下图1.5所示:图1.5 用户许可证协议窗口步骤3:选中“I accept the license terms”的前面的选择框,然后点击【Next】按钮,会进入查找最新版本界面,效果如下图1.6所示:图1.6 查找最新版本窗口步骤4:单击【Execute】按钮,会进入安装类型设置界面,效果如下图1.7所示。

mysql安装配置教程

mysql安装配置教程

mysql安装配置教程1.mysql下载 2.mysql安装规范 MySQL安装⽅式:推荐使⽤⼆进制安装(其他安装⽅式:源码编译安装、yum、rpm) MySQL运⾏⽤户:mysql:mysql注意该⽤户是虚拟⽤户,只是⽤于mysql进程运⾏使⽤,不允许登录、不创建家⽬录 MySQL⽬录规范: 下载⽬录/server/tools 系统⽬录/opt/mysql/mysql-xx.xx 软连接ln-s/opt/mysql/mysql-xx.xx /usr/local/mysql 数据⽬录/data/mysql/mysql+port/{data,logs} 配置⽂件/data/mysql/mysql+port/my+f 3.⼆进制安装MySQL5.7.26(该⽅式⽤于在linux系统下安装) Linux操作系统安装MySQL 。

创建MySQL虚拟⽤户 useradd -s /sbin/nologin -M mysql #创建⽤户命令 id mysql #查看是否创建成功 。

创建⽬录 mkdir -p /server/tools mkdir -p /opt/mysql mkdir -p /data/mysql/mysql3306/{data,logs} cd /server/tools #进⼊到该⽬录 。

将下载的⽂件上传 rz #上传mysql⼆进制⽂件 ll #查看⽂件是否上传成功 yum install -y lrzsz #如没有rz命令,可通过yum安装 。

解压⼆进制包 tar xf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz 。

将软件部分移动到指定⽬录 mv mysql-5.7.26-linux-glibc2.12-x86_64 /opt/mysql/mysql-5.7.26 。

创建软连接 ln -s /opt/mysql/mysql-5.7.26/ /usr/local/mysql 。

【MySQL】源码编译安装和配置MySql5.5.32(单实例)

【MySQL】源码编译安装和配置MySql5.5.32(单实例)

【MySQL】源码编译安装和配置MySql5.5.32(单实例)【需求描述】在CentOS环境中,通过编译源码的⽅式,安装并且配置“单实例”的MySQL5.5.32数据库。

MySQL的安装⽬录为:/application/mysql-5.5.32MySQL数据⽂件的安装⽬录为:/application/mysql-5.5.32/dataMySQL默认的字符编码为:UTF8【环境参数】VMware:10.0.1Host:Win7DB:MySql 5.5.32编译⼯具:cmake-2.8.8.tar.gz其他依赖:ncurses-devel-5.7-3.20090208.el6.x86_64.rpmClient:CentOS 6.5 x86_64,i686,最⼩化安装(Minimal)。

在安装⾃定义组件包时,(1)Base System只安装了Base,Compatibility Libraries和Debugging Tools。

(2)Development只安装了Development Tools。

【软件下载】(1)MySql下载地址:选择“Generic Linux (Architecture Independent), Compressed TAR Archive”这个版本的来下载。

(2)下载cmakeCMake是⼀个跨平台的安装(编译)⼯具,可以⽤简单的语句来描述所有平台的安装(编译过程)。

他能够输出各种各样的makefile或者project⽂件,能测试编译器所⽀持的C++特性,类似UNIX下的automake。

只是 CMake 的组态档取名为 CmakeLists.txt。

(3)下载ncurse-devel依赖包的百度云盘分享:【具体步骤】1、查看系统环境[root@centos65-mini ~]# cat /etc/redhat-releaseCentOS release 6.5 (Final)[root@centos65-mini ~]#[root@centos65-mini ~]#[root@centos65-mini ~]# uname -r2.6.32-431.el6.x86_64[root@centos65-mini ~]#2、安装相关软件包(1) 配置、编译和安装cmake编译⼯具①在当前⽬录,解压缩cmake-2.8.8.tar.gz# tar –zxvf cmake-2.8.8.tar.gz②从当前⽬录切换到cmake-2.8.8⽬录中,# cd cmake-2.8.8③执⾏命令“#./configure”来配置cmake⼯具。

MySQL 6.0安装图解

MySQL 6.0安装图解

MySQL 6.0安装图解由于免费,MySQL数据库在项目中用的越来越广泛,而且它的安全性能也特别高,不亚于oracle这样的大型数据库软件。

可以简单的说,在一些中小型的项目中,使用MySQL ,PostgreSQL是最佳的选择。

今天就来说一下MySQL的安装过程。

/downloads/既然是免费的,我这里下载的是mysql-essential-6.0.10-alpha-win32.msi。

当然还有很多类型,根据自身系统的要求下载就可以了。

点击mysql-essential-6.0.10-alpha-win32.msi,会出现安装向导,如下图。

安装向导起始页,按【Next】继续选择安装类型,一般都分为【Typical】【Complete】【Custom】。

一般新手选择【Typical】或【Complete】就可以了,为了看一下安装细节,我们选择【Custom】,然后按【Next】继续。

在C Include Files/Lib Files 上左键,选择第一项,将此特性安装到本地硬盘。

安装这些特性是为了更好的支持一些其他的开发。

所以如果硬盘空间宽裕的话,见多不怪。

然后按【Next】继续。

选择安装路径。

视硬盘的大小自行选择。

然后按【OK】。

这里我选择了D盘。

如果需要改变的话按【Change】重新选择,确定无误按【Next】继续。

当前的安装设置信息,如果需要改变这些安装设置,可以按【Back】重新选择安装设置,确定无误之后按【Install】将MySQL安装到本地硬盘上。

请耐心等待,安装向导正在安装MySQL,这需要话几分钟。

这里只选择【Configure the MySQL Serve now】,如果你想注册MySQL也可以选择。

确定后按【Finish】完成安装,接着进行服务器的配置。

一下环节很重要哦。

进行MySQL服务器实例配置,当然了,也可按【取消】,以后配置也可以。

按【Next】继续。

选择配置类型,分为【Detialed Configuration】(详细配置),【Standard Configuration】(标准配置)。

linux下MySQL使用方法

linux下MySQL使用方法

linux下MySQL使用方法===============================================================一、引言想使用Linux已经很长时间了,由于没有硬性任务一直也没有系统学习,近日由于工作需要必须使用Linux下的MySQL。

本以为有Windows下使用SQL Server的经验,觉得在Linux下安装MySql应该是易如反掌的事,可在真正安装和使用MySQL时走了很多弯路,遇见很多问题,毕竟Linux 和Windows本身就有很大区别。

为了让和我一样的初学者在学习的过程中少走弯路,尽快入门,写了此文,希望对您有所帮助。

本文的Linux环境是 Red Hat 9.0,MySQL是4.0.16。

二、安装Mysql1、下载MySQL的安装文件安装MySQL需要下面两个文件:MySQL-server-4.0.16-0.i386.rpmMySQL-client-4.0.16-0.i386.rpm下载地址为:/downloads/mysql-4.0.html,打开此网页,下拉网页找到“Linux x86 RPM downloads”项,找到“Server”和“Client programs”项,下载需要的上述两个rpm文件。

2、安装MySQLrpm文件是Red Hat公司开发的软件安装包,rpm可让Linux在安装软件包时免除许多复杂的手续。

该命令在安装时常用的参数是–ivh ,其中i表示将安装指定的rmp软件包,V表示安装时的详细信息,h表示在安装期间出现“#”符号来显示目前的安装过程。

这个符号将持续到安装完成后才停止。

1)安装服务器端在有两个rmp文件的目录下运行如下命令:[root@test1 local]# rpm -ivh MySQL-server-4.0.16-0.i386.rpm显示如下信息。

warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 Preparing... ########################################### [100%]1:MySQL-server ########################################### [100%] 。

CentOS7安装MySQL8.0小计

CentOS7安装MySQL8.0小计

CentOS7安装MySQL8.0⼩计之前讲配置⽂件和权限的时候有很多MySQL8的知识,有同志说安装不太⼀样,希望发个⽂,我这边简单演⽰⼀下1.下载MySQL提供的CentOS7的yum源官⽅⽂档:<>过程中有不太懂的可以看我之前写的这篇⽂章:<>地址:安装yum源:yum install centos7.mysql.rpm -y安装MySQL8.0 yum install mysql-community-server -y启动mysql systemctl start mysqld设置开机启动mysql systemctl enable mysqld2.查看初始密码cat /var/log/mysqld.log | grep "password"安全初始化mysql_secure_installation3.权限相关详细可以查看上次写的⽂章:⽤root账号登录mysql -uroot -p创建⽤户dnt create user dnt@'%' identified by '含⼤⼩写字母+数字的密码';查看当前有哪些⽤户select user,authentication_string,host from er;给⽤户dnt分配数据库dotnetcrazy的所有权限grant all on dotnetcrazy.* to dnt;刷新权限flush privileges;显⽰新⽤户有哪些权限show grants for dnt;4.root权限去修改/etc/f在[mysqld]选项下新增:bind-address=0.0.0.0开放3306端⼝的远程访问权限:firewall-cmd --zone=public --add-port=3306/tcp --permanent刷新防⽕墙规则firewall-cmd --reload重启MySQL:systemctl restart mysqld测试1.安装附录# 下载yum源(curl是系统⾃带的)# curl https:////mysql80-community-release-el7-3.noarch.rpm > centos7.mysql.rpm[root@localhost dnt] curl https:////mysql80-community-release-el7-3.noarch.rpm > centos7.mysql.rpm% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 26024 100 26024 0 0 38150 0 --:--:-- --:--:-- --:--:-- 38158[root@localhost dnt]# lscentos7.mysql.rpm# 安装MySQL的yum源# yum install centos7.mysql.rpm -y[root@localhost dnt] yum install centos7.mysql.rpm -y已加载插件:fastestmirror正在检查 centos7.mysql.rpm: mysql80-community-release-el7-3.noarchcentos7.mysql.rpm 将被安装正在解决依赖关系--> 正在检查事务---> 软件包 mysql80-community-release.noarch.0.el7-3 将被安装--> 解决依赖关系完成依赖关系解决========================================================================================================== Package 架构版本源⼤⼩==========================================================================================================正在安装:mysql80-community-release noarch el7-3 /centos7.mysql 31 k事务概要==========================================================================================================安装 1 软件包总计:31 k安装⼤⼩:31 kDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transaction正在安装 : mysql80-community-release-el7-3.noarch 1/1验证中 : mysql80-community-release-el7-3.noarch 1/1已安装:mysql80-community-release.noarch 0:el7-3完毕!# 安装MySQL8.0# yum install mysql-community-server -y[root@localhost dnt] yum install mysql-community-server -y已加载插件:fastestmirrorLoading mirror speeds from cached hostfile* base: * extras: * updates: base | 3.6 kB 00:00:00extras | 3.4 kB 00:00:00mysql-connectors-community | 2.5 kB 00:00:00mysql-tools-community | 2.5 kB 00:00:00mysql80-community | 2.5 kB 00:00:00updates | 3.4 kB 00:00:00(1/3): mysql-connectors-community/x86_64/primary_db | 41 kB 00:00:00(2/3): mysql80-community/x86_64/primary_db | 70 kB 00:00:00(3/3): mysql-tools-community/x86_64/primary_db | 58 kB 00:00:00正在解决依赖关系--> 正在检查事务---> 软件包 mysql-community-server.x86_64.0.8.0.16-2.el7 将被安装--> 正在处理依赖关系 mysql-community-common(x86-64) = 8.0.16-2.el7,它被软件包 mysql-community-server-8.0.16-2.el7.x86_64 需要--> 正在处理依赖关系 mysql-community-client(x86-64) >= 8.0.11,它被软件包 mysql-community-server-8.0.16-2.el7.x86_64 需要--> 正在处理依赖关系 net-tools,它被软件包 mysql-community-server-8.0.16-2.el7.x86_64 需要--> 正在检查事务---> 软件包 mysql-community-client.x86_64.0.8.0.16-2.el7 将被安装--> 正在处理依赖关系 mysql-community-libs(x86-64) >= 8.0.11,它被软件包 mysql-community-client-8.0.16-2.el7.x86_64 需要---> 软件包 mysql-community-common.x86_64.0.8.0.16-2.el7 将被安装---> 软件包 net-tools.x86_64.0.2.0-0.24.20131004git.el7 将被安装--> 正在检查事务---> 软件包 mariadb-libs.x86_64.1.5.5.60-1.el7_5 将被取代--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 2:postfix-2.10.1-7.el7.x86_64 需要--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 2:postfix-2.10.1-7.el7.x86_64 需要---> 软件包 mysql-community-libs.x86_64.0.8.0.16-2.el7 将被舍弃--> 正在检查事务---> 软件包 mysql-community-libs-compat.x86_64.0.8.0.16-2.el7 将被舍弃--> 解决依赖关系完成依赖关系解决========================================================================================================== Package 架构版本源⼤⼩==========================================================================================================正在安装:mysql-community-libs x86_64 8.0.16-2.el7 mysql80-community 3.0 M替换 mariadb-libs.x86_64 1:5.5.60-1.el7_5mysql-community-libs-compat x86_64 8.0.16-2.el7 mysql80-community 2.1 M替换 mariadb-libs.x86_64 1:5.5.60-1.el7_5mysql-community-server x86_64 8.0.16-2.el7 mysql80-community 403 M为依赖⽽安装:mysql-community-client x86_64 8.0.16-2.el7 mysql80-community 32 Mmysql-community-common x86_64 8.0.16-2.el7 mysql80-community 575 knet-tools x86_64 2.0-0.24.20131004git.el7 base 306 k事务概要==========================================================================================================安装 3 软件包 (+3 依赖软件包)总下载量:441 MDownloading packages:警告:/var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-common-8.0.16-2.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY mysql-community-common-8.0.16-2.el7.x86_64.rpm 的公钥尚未安装(1/6): mysql-community-common-8.0.16-2.el7.x86_64.rpm | 575 kB 00:00:00(2/6): mysql-community-libs-8.0.16-2.el7.x86_64.rpm | 3.0 MB 00:00:00(3/6): mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm | 2.1 MB 00:00:00(4/6): net-tools-2.0-0.24.20131004git.el7.x86_64.rpm | 306 kB 00:00:00(5/6): mysql-community-client-8.0.16-2.el7.x86_64.rpm | 32 MB 00:00:14(6/6): mysql-community-server-8.0.16-2.el7.x86_64.rpm | 403 MB 00:01:08-------------------------------------------------------------------------------------------------------------------总计 6.2 MB/s | 441 MB 00:01:10从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 检索密钥导⼊ GPG key 0x5072E1F5:⽤户ID : "MySQL Release Engineering <mysql-build@>"指纹 : a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5软件包 : mysql80-community-release-el7-3.noarch (installed)来⾃ : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysqlRunning transaction checkRunning transaction testTransaction test succeededRunning transaction正在安装 : mysql-community-common-8.0.16-2.el7.x86_64 1/7正在安装 : mysql-community-libs-8.0.16-2.el7.x86_64 2/7正在安装 : mysql-community-client-8.0.16-2.el7.x86_64 3/7正在安装 : net-tools-2.0-0.24.20131004git.el7.x86_64 4/7正在安装 : mysql-community-server-8.0.16-2.el7.x86_64 5/7正在安装 : mysql-community-libs-compat-8.0.16-2.el7.x86_64 6/7正在删除 : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 7/7验证中 : mysql-community-libs-8.0.16-2.el7.x86_64 1/7验证中 : net-tools-2.0-0.24.20131004git.el7.x86_64 2/7验证中 : mysql-community-libs-compat-8.0.16-2.el7.x86_64 3/7验证中 : mysql-community-client-8.0.16-2.el7.x86_64 4/7验证中 : mysql-community-common-8.0.16-2.el7.x86_64 5/7验证中 : mysql-community-server-8.0.16-2.el7.x86_64 6/7验证中 : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 7/7已安装:mysql-community-libs.x86_64 0:8.0.16-2.el7 mysql-community-libs-compat.x86_64 0:8.0.16-2.el7mysql-community-server.x86_64 0:8.0.16-2.el7作为依赖被安装:mysql-community-client.x86_64 0:8.0.16-2.el7 mysql-community-common.x86_64 0:8.0.16-2.el7net-tools.x86_64 0:2.0-0.24.20131004git.el7替代:mariadb-libs.x86_64 1:5.5.60-1.el7_5完毕!# 启动mysql# systemctl start mysqld[root@localhost dnt] systemctl start mysqld[root@localhost dnt] pstree | grep mysql|-mysqld---37*[{mysqld}]# 设置开机启动mysql# systemctl enable mysqld[root@localhost dnt] systemctl enable mysqld[root@localhost dnt] rebootConnection closing...Socket close.Connection closed by foreign host.Disconnected from remote host(MySQL_CentOS) at 10:56:42.Connecting to 192.168.36.205:22...Connection established.To escape to local shell, press 'Ctrl+Alt+]'.WARNING! The remote SSH server rejected X11 forwarding request.Last login: Wed May 15 10:35:07 2019 from 192.168.36.144[dnt@localhost ~]$ pstree | grep mysql|-mysqld---37*[{mysqld}]# 查看mysql的状态# systemctl status mysqld[dnt@localhost ~]$ systemctl status mysqld● mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: active (running) since 三 2019-05-15 10:57:26 CST; 1min 3s agoDocs: man:mysqld(8)/doc/refman/en/using-systemd.htmlProcess: 3934 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)Main PID: 3969 (mysqld)Status: "SERVER_OPERATING"CGroup: /system.slice/mysqld.service└─3969 /usr/sbin/mysqld2.初始化配置附录# 查看初始密码# cat /var/log/mysqld.log | grep "password"[dnt@localhost ~]$ cat /var/log/mysqld.log | grep "password"2019-05-15T02:55:51.132377Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: wI>X.(tHE5&e # 安全初始化# mysql_secure_installation[dnt@localhost ~]$ mysql_secure_installationSecuring the MySQL server deployment.Enter password for user root:The 'validate_password' component is installed on the server.The subsequent steps will run with the existing configurationof the component.Using existing password for root.Estimated strength of the password: 100Change the password for root ? ((Press y|Y for Yes, any other key for No) : n... skipping.By default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment.Remove anonymous users? (Press y|Y for Yes, any other key for No) : ySuccess.Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) : ySuccess.By default, MySQL comes with a database named 'test' thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment.Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y- Dropping test database...Success.- Removing privileges on test database...Success.Reloading the privilege tables will ensure that all changesmade so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : ySuccess.All done!3.权限附录# ⽤root账号登录# mysql -uroot -p[dnt@localhost ~]$ mysql -uroot -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 38Server version: 8.0.16 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.# show databases;mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || sys |+--------------------+4 rows in set (0.00 sec)# 创建⽤户dnt# create user dnt@'%' identified by '含⼤⼩写字母+数字的密码';mysql> create user dnt@'%' identified by '含⼤⼩写字母+数字的密码';Query OK, 0 rows affected (0.06 sec)# 查看当前有哪些⽤户# select user,authentication_string,host from er;mysql> select user,authentication_string,host from er;+------------------+------------------------------------------------------------------------+-----------+| user | authentication_string | host |+------------------+------------------------------------------------------------------------+-----------+| dnt | $A$005$yOK}8VFp< LE0BLBPFmeTy2vi8Q1JdmkhkPkaWBilxWYW2/jSsJ4OEa7B | % || schema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | localhost | | mysql.session | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | localhost | | mysql.sys | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | localhost | | root | $A$005$yAn@!RwTRzRLdyRrHMdoneUh7pdKEJVFUl9LHdG5MHeL.gdovFMI7z22 | localhost |+------------------+------------------------------------------------------------------------+-----------+5 rows in set (0.00 sec)# 创建⼀个数据库# create database dotnetcrazy charset=utf8;mysql> create database dotnetcrazy charset=utf8;Query OK, 1 row affected, 1 warning (0.71 sec)mysql> show databases;+--------------------+| Database |+--------------------+| dotnetcrazy || information_schema || mysql || performance_schema || sys |+--------------------+5 rows in set (0.00 sec)# 给⽤户dnt分配数据库dotnetcrazy的所有权限# grant all on dotnetcrazy.* to dnt;mysql> grant all on dotnetcrazy.* to dnt;Query OK, 0 rows affected (0.69 sec)# 刷新权限# flush privileges;mysql> flush privileges;Query OK, 0 rows affected (0.59 sec)# 显⽰新⽤户有哪些权限# show grants for dnt;mysql> show grants for dnt;+------------------------------------------------------+| Grants for dnt@% |+------------------------------------------------------+| GRANT USAGE ON *.* TO `dnt`@`%` || GRANT ALL PRIVILEGES ON `dotnetcrazy`.* TO `dnt`@`%` |+------------------------------------------------------+2 rows in set (0.00 sec)mysql> exitBye# ⽤新增⽤户登录# mysql -udnt -p[dnt@localhost ~]$ mysql -udnt -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 39Server version: 8.0.16 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.# show databases;mysql> show databases;+--------------------+| Database |+--------------------+| dotnetcrazy || information_schema |+--------------------+2 rows in set (0.01 sec)4.配置附录[dnt@localhost ~]$ su密码:[root@localhost dnt]# ls /etc/ | grep myff.d[root@localhost dnt]# ls /etc/f.d/# 修改配置,运⾏远程登录[root@localhost dnt]# vi /etc/f[root@localhost dnt]# cat /etc/f[mysqld]bind-address=0.0.0.0 # 新增内容datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid# 查看⼀下防⽕墙状态# systemctl status firewalld[root@localhost dnt] systemctl status firewalld● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)Active: active (running) since 三 2019-05-15 17:37:49 CST; 28min agoDocs: man:firewalld(1)Main PID: 3467 (firewalld)CGroup: /system.slice/firewalld.service└─3467 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid5⽉ 15 17:37:47 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 5⽉ 15 17:37:49 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. # 开放3306端⼝的远程访问权限# firewall-cmd --zone=public --add-port=3306/tcp --permanent[root@localhost dnt]# firewall-cmd --zone=public --add-port=3306/tcp --permanentsuccess# 刷新防⽕墙规则# firewall-cmd --reload[root@localhost dnt]# firewall-cmd --reloadsuccess# 重启MySQL# systemctl restart mysqld[root@localhost dnt]# systemctl restart mysqld。

CentOS 6.0安装MySQL 5.6及配置

CentOS 6.0安装MySQL 5.6及配置从今年3月份开始mysql官网开始发布相关的5.6系列的各个版本,对于mysql5.6系列的版本对一起的版本进行了全局性的细节性加强;个人感觉,以下是在虚拟机中配置的mysql5.6.10源码安装的过程分享记录下:一、必要软件包安装:[root@mysql5~]#yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurse s-devel libmcrypt* libtool-ltdl-devel* make cmake二、编译安装:[root@mysql5 ~]# groupadd mysql[root@mysql5 ~]# useradd -r -g mysql mysql[root@mysql5 ~]# lsanaconda-ks.cfg install.log install.log.syslog mysql-5.6.10.tar.gz[root@mysql5 ~]# cd /usr/local/[root@mysql5 local]# lsbin etc games include lib libexec sbin share src[root@mysql5 local]# cp /root/mysql-5.6.10.tar.gz /usr/local/[root@mysql5 local]# lltotal 34468drwxr-xr-x 2 root root 4096 Jan 27 2010 bindrwxr-xr-x 2 root root 4096 Jan 27 2010 etcdrwxr-xr-x 2 root root 4096 Jan 27 2010 gamesdrwxr-xr-x 2 root root 4096 Jan 27 2010 includedrwxr-xr-x 2 root root 4096 Jan 27 2010 libdrwxr-xr-x 2 root root 4096 Jan 27 2010 libexec-rw-r--r-- 1 root root 35174149 Apr 17 00:55 mysql-5.6.10.tar.gzdrwxr-xr-x 2 root root 4096 Jan 27 2010 sbindrwxr-xr-x 4 root root 4096 Apr 17 00:32 sharedrwxr-xr-x 2 root root 4096 Jan 27 2010 src[root@mysql5 local]# tar -zxvf mysql-5.6.10.tar.gz[root@mysql5 local]# cd mysql-5.6.10[root@mysql5 local]# cmake . ###编译报如下错误暂不管[ 63%] Building CXX object sql/CMakeFiles/sql.dir/sql_.o/root/mysql-5.6.13/sql/sql_: In member function ‘void Optimize_table_order::best_access_path(JOIN_TAB*, table_map, uint, bool, double, POSITION*, POSITION*)’:/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_loose_scan_start_key’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_max_loose_keypart’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_loose_scan_records’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_loose_scan_key’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::quick_max_loose_keypart’may be used uninitialized in this function[root@mysql5 local]# make && make install三、配置MySQL[root@mysql5 mysql-5.6.10]# chown -R mysql.mysql /usr/local/mysql[root@mysql5 mysql-5.6.10]#[root@mysql5 mysql-5.6.10]# cd /usr/local/mysql/scripts/[root@mysql5 scripts]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/dataInstalling MySQL system tables...2013-04-17 01:26:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2013-04-17 01:26:58 18715 [Note] InnoDB: The InnoDB memory heap is disabled2013-04-17 01:26:58 18715 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation2013-04-17 01:26:58 18715 [Note] InnoDB: Compressed tables use zlib 1.2.32013-04-17 01:26:58 18715 [Note] InnoDB: CPU does not support crc32 instructions2013-04-17 01:26:58 18715 [Note] InnoDB: Initializing buffer pool, size = 128.0M2013-04-17 01:26:58 18715 [Note] InnoDB: Completed initialization of buffer pool2013-04-17 01:26:58 18715 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!2013-04-17 01:26:59 18715 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Database physically writes the file full: wait...2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2013-04-17 01:26:59 18715 [Warning] InnoDB: New log files created, LSN=457812013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer not found: creating new2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer created2013-04-17 01:26:59 18715 [Note] InnoDB: 128 rollback segment(s) are active.2013-04-17 01:26:59 18715 [Warning] InnoDB: Creating foreign key constraint system tables. 2013-04-17 01:26:59 18715 [Note] InnoDB: Foreign key constraint system tables created2013-04-17 01:26:59 18715 [Note] InnoDB: Creating tablespace and datafile system tables. 2013-04-17 01:26:59 18715 [Note] InnoDB: Tablespace and datafile system tables created.2013-04-17 01:26:59 18715 [Note] InnoDB: Waiting for purge to start2013-04-17 01:26:59 18715 [Note] InnoDB: 1.2.10 started; log sequence number 02013-04-17 01:26:59 18715 [Note] Binlog end2013-04-17 01:26:59 18715 [Note] InnoDB: FTS optimize thread exiting.2013-04-17 01:26:59 18715 [Note] InnoDB: Starting shutdown...2013-04-17 01:27:00 18715 [Note] InnoDB: Shutdown completed; log sequence number 1625977 OKFilling help tables...2013-04-17 01:27:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2013-04-17 01:27:00 18738 [Note] InnoDB: The InnoDB memory heap is disabled2013-04-17 01:27:00 18738 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation2013-04-17 01:27:00 18738 [Note] InnoDB: Compressed tables use zlib 1.2.32013-04-17 01:27:00 18738 [Note] InnoDB: CPU does not support crc32 instructions2013-04-17 01:27:00 18738 [Note] InnoDB: Initializing buffer pool, size = 128.0M2013-04-17 01:27:00 18738 [Note] InnoDB: Completed initialization of buffer pool2013-04-17 01:27:00 18738 [Note] InnoDB: Highest supported file format is Barracuda.2013-04-17 01:27:00 18738 [Note] InnoDB: 128 rollback segment(s) are active.2013-04-17 01:27:00 18738 [Note] InnoDB: Waiting for purge to start2013-04-17 01:27:01 18738 [Note] InnoDB: 1.2.10 started; log sequence number 16259772013-04-17 01:27:01 18738 [Note] Binlog end2013-04-17 01:27:01 18738 [Note] InnoDB: FTS optimize thread exiting.2013-04-17 01:27:01 18738 [Note] InnoDB: Starting shutdown...2013-04-17 01:27:02 18738 [Note] InnoDB: Shutdown completed; log sequence number 1625987 OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/local/mysql/bin/mysqladmin -u root password 'new-password'/usr/local/mysql/bin/mysqladmin -u root -h mysql5.6 password 'new-password'Alternatively you can run:/usr/local/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd . ; /usr/local/mysql/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems with the ./bin/mysqlbug script!The latest information about MySQL is available on the web at Support MySQL by buying support/licenses at New default config file was created as /usr/local/mysql/f and will be used by default by the server when you start it.You may edit this file to change server settingsWARNING: Default config file /etc/f exists on the systemThis file will be read by default by the MySQL serverIf you do not want to use this, either remove it, or use the--defaults-file argument to mysqld_safe when starting the server[root@mysql5 scripts]#[root@mysql5 scripts]# cd /usr/local/mysql/support-files/[root@mysql5 support-files]# cp mysql.server /etc/rc.d/init.d/mysql cp: overwrite `/etc/rc.d/init.d/mysql'? y[root@mysql5 support-files]# cp f /etc/fcp: overwrite `/etc/f'? y[root@mysql5 support-files]#[root@mysql5 support-files]# chkconfig -add mysql-add: unknown option[root@mysql5 support-files]# chkconfig --add mysql[root@mysql5 support-files]# chkconfig mysql on[root@mysql5 support-files]# service mysql startStarting MySQL. [ OK ] [root@mysql5 support-files]#[root@mysql5 data]# mysql -u mysql -p -S /tmp/mysql.sockEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.6.10 Source distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>mysql> status;--------------mysql Ver 14.12 Distrib 5.0.77, for RedHat-linux-gnu (i686) using readline 5.1Connection id: 1Current database:Current user: mysql@localhostSSL: Not in useCurrent pager: stdoutUsing outfile: ''Using delimiter: ;Server version: 5.6.10 Source distributionProtocol version: 10Connection: Localhost via UNIX socketServer characterset: latin1Db characterset: latin1Client characterset: latin1Conn. characterset: latin1UNIX socket: /tmp/mysql.sockUptime: 3 min 38 secThreads: 1 Questions: 5 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.022--------------mysql>四、远程登录及常用命令1、mysql服务的启动和停止net stop mysqlnet start mysql2、本地登陆mysql及远程登录语法如下:mysql -u用户名-p用户密码键入命令mysql –uroot -p,回车后提示你输入密码,输入12345,然后回车即可进入到mysql 中了,mysql的提示符是:mysql>注意,如果是连接到另外的机器上,则需要加入一个参数-h机器IP但被远程登录的mysql服务器需增加登录账号,方法如下:mysql>GRANT ALL PRIVILEGES ON*.* TO USER1@’%’ IDENTIFIED BY ’password’mysql>FLUSH PRIVILEGES;3、增加新用户格式:grant 权限on 数据库.* to 用户名@登录主机identified by "密码"如,增加一个用户user1密码为password1,让其可以在本机上登录,并对所有数据库有查询、插入、修改、删除的权限。

Rhel7安装mysql5.7详细步骤

tar -xvf mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar
会看到很多的rpm包,但是我们需要的就下面的4个rpm包,安装的时候需要依次执行
次执行命令:
rpm -ivh mysql-community-common-5.7.9-1.el7.x86_64.rpm
5.启动mysql服务
systemctl start mysqld
若遇到mysql服务不能正常启动。
错误为:Job for mysqld.service failed. See 'systemctl status mysqld.service' and 'journalctl -xn' for details.
并及时为root用户添加密码 mysql -u root --skip-password
在进行初始化的时候,mysqld服务会检查数据目录是否存在,如下:
如果数据目录不存在,mysqld则会创建它。
如果数据目录存在,且不是空目录(即包含有文件或子目录),mysqld会显示一条错误信息并中止:
如果还出现和下图一样的提示,我们执行另一条命令:chown -R mysql:mysql /var/lib/mysql,
将/var/lib/mysql目录及其下所有文件和子目录的所有者和所属组都改为mysql。我们再执行一下:systemctl start mysqld应该就可以启动mysqld服务了。
7.修改mysql默认数据库存放目录
systemctl stop mysqld
复制 cp -a -R -rf /var/lib/mysql /md0/data/

REDHAT linux下安装MYSQL

LINUX 下安装配置MYSQL1,下载MYSQL安装程序地址:/downloads/mysql/选择你所安装环境下的服务器:分别下载SERVER程序:MySQL-server-community-5.1.44-1.rhel5.i386.rpmCLIENT工具:MySQL-client-community-5.1.44-1.rhel5.i386.rpm2,通过本地SSH Secure工具将文件上传到服务器1)安装服务器端在有两个rmp文件的目录下运行如下命令:[root@test1 local]# rpm -ivh MySQL-server-community-5.1.44-1.rhel5.i386.rpm显示如下信息:Preparing...########################################### [100%]1:MySQL-server ########################################### [100%]2)测试是否安装成功[root@test1 local]# netstat -natpl显示3306端口开放表示服务安装成功3)安装客户端工具[root@test1 local]# rpm -ivh MySQL-client-community-5.1.44-1.rhel5.i386.rpmPreparing...########################################### [100%]1:MySQL-client########################################### [100%]显示安装完成4)测试连接[root@test1 local]# mysql出现如下提示符mysql>表示登陆成功。

以上登陆情况是在没有设置密码的情况下登陆,在设置防火墙前注意对MYSQL设置密码5)对MYSQL用户ROOT设置密码[root@test1 local]# /usr/bin/mysqladmin -u root password 123456注:123456只是事例密码,实际配置过程中注意相关密码复杂性要求6) 对mysql用户设置远程访问权限方法1,改表法。

mysql5.7.9安装步骤

安装版本:mysql-5.7.9-linux-glibc2.5-i686 (二进制包)操作环境:Red Hat Enterprise Linux Server release 5.8 (Tikanga)(lsb_release -a)安装步骤:准备:创建mysql组和用户[root@hucc /]#groupaddmysql[root@hucc /]#useradd -r -g mysql mysql1.rz将mysql安装包传到虚拟机的/usr/local/src[root@huccsrc]# tar zxvfmysql-5.7.9-linux-glibc2.5-i686.tar[root@huccsrc]#cpmysql-5.7.9-linux-glibc2.5-i686 /usr/local/mysql/[root@hucc local]#chown –R mysql:mysqlmysql[root@huccmysql]# mkdir data[root@huccmysql]#pwd/var/lib/mysql[root@huccmysql]#chown –R mysql:mysql data[root@huccmysql]#sumysql[mysql@hucc /]$ /usr/local/mysql/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql/data2.安装数据库[mysql@huccmysql]$ /usr/local/mysql/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql/data/2015-11-11 11:16:51 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize 2015-11-11 11:17:02 [WARNING] The bootstrap log isn't empty:2015-11-11 11:17:02 [WARNING] 2015-11-11T03:16:51.695249Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead2015-11-11T03:16:51.696235Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)2015-11-11T03:16:51.696248Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)注:datadir参数:该参数指定了MySQL 的数据库文件放在什么路径下。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1、下载MySQL安装文件,下载地址:点此下载MySQL5.5.0;
2、打开下载的mysql安装文件mysql-5.0.27-win32.zip,双击解压缩,运行“setup.exe”,出现如下界面,mysql安装向导启动,按“Next”继续
3、选择安装类型,有“Typical(默认)”、“Complete(完全)”、“Custom(用户自定义)”三个选项,我们选择“Custom”,有更多的选项,也方便熟悉安装过程
4、在“Developer Components(开发者部分)”上左键单击,选择“This feature, and all subfeatures, will be installed on local hard drive.”,即“此部分,及下属子部分内容,全部安装在本地硬盘上”。

在上面的“MySQL Server(mysql服务器)”、“Client Programs(mysql客户端程序)”、“Documentation(文档)”也如此操作,以保证安装所有文件。

点选“Change...”,手动指定安装目录。

5、填上安装目录,我的是“F:\Server\MySQL\MySQL Server 5.0”,也建议不要放在与操作系统同一分区,这样可以防止系统备份还原的时候,数据被清空。

按“OK”继
续。

6、返回刚才的界面,按“Next”继续
7、确认一下先前的设置,如果有误,按“Back”返回重做。

按“Install”开始安装。

8、正在安装中,请稍候
9、出现下面的界面,这里是询问你是否要注册一个的账号,或是使用已有的账号登陆,一般不需要了,点选“Skip Sign-Up”,按“Next”略过此步骤。

10、现在软件安装完成了,出现上面的界面,这里有一个很好的功能,mysql配置向导,不用向以前一样,自己手动乱七八糟的配置my.ini了,将“Configure the Mysql Server now”前面的勾打上,点“Finish”结束软件的安装并启动mysql配置向导。

11、mysql配置向导启动界面,按“Next”继续
12、选择配置方式,“Detailed Configuration(手动精确配置)”、“Standard Configuration(标准配置)”,我们选择“Detailed Configuration”,方便熟悉配置过程。

13、选择服务器类型,“Developer Machine(开发测试类,mysql占用很少资源)”、“Server Machine(服务器类型,mysql占用较多资源)”、“Dedicated MySQL Server Machine(专门的数据库服务器,mysql 占用所有可用资源)”,大家根据自己的类型选择了,一般选“Server Machine”,不会太少,也不会占满。

14、选择mysql数据库的大致用途,“Multifunctional Database(通用多功能型,好)”、“Transactional Database Only(服务器类型,专注于事务处理,一般)”、“Non-Transactional Database Only(非事务处理型,较简单,主要做一些监控、记数用,对MyISAM数据类型的支持仅限于non-transactional),随自己的用途而选择了,我这里选择“Transactional Database Only”,按“Next”继续。

15、对InnoDB Tablespace进行配置,就是为InnoDB 数据库文件选择一个存储空间,如果修改了,要记住位置,重装的时候要选择一样的地方,否则可能会造成数据库损坏,当然,对数据库做个备份就没问题了,这里不详述。

我这里没有修改,使用用默认位置,直接按“Next”继续
16、选择您的网站的一般mysql访问量,同时连接的数目,“Decision Support(DSS)/OLAP(20个左右)”、“Online Transaction Processing(OLTP)(500个左右)”、“Manual Setting(手动设置,自己输一个数)”,我这里选“Online Transaction Processing(OLTP)”,自己的服务器,应该够用了,按“Next”继续
17、是否启用TCP/IP连接,设定端口,如果不启用,就只能在自己的机器上访问mysql数据库了,我这里启用,把前面的勾打上,Port Number:3306,在这个页面上,您还可以选择“启用标准模式”(Enable Strict Mode),这样MySQL就不会允许细小的语法错误。

如果您还是个新手,我建议您取消标准模式以减少麻烦。

但熟悉MySQL以后,尽量使用标准模式,因为它可以降低有害数据进入数据库的可能性。

按“Next”继续
18、下面的比较重要,就是对mysql默认数据库语言编码进行设置,第一个是西文编码,第二个是多字节的通用utf8编码,都不是我们通用的编码,这里选择第三个,然后在Character Set那里选择或填入“gbk”,当然也可以用“gb2312”,区别就是gbk的字库容量大,包括了gb2312的所有汉字,并且加上了繁体字、和其它乱七八糟的字——使用mysql的时候,在执行数据操作命令之前运行一次“SET NAMES GBK;”(运行一次就行了,GBK可以替换为其它值,视这里的设置而定),就可以正常的使用汉字(或其它文字)了,否则不能正常显示汉字。

按“Next”继续。

19、选择是否将mysql安装为windows服务,还可以指定Service Name(服务标识名称),是否将mysql 的bin目录加入到Windows PATH(加入后,就可以直接使用bin下的文件,而不用指出目录名,比如连接,“mysql.exe -uusername -ppassword;”就可以了,不用指出mysql.exe的完整地址,很方便),我这里全部打上了勾,Service Name不变。

按“Next”继续。

20、这一步询问是否要修改默认root用户(超级管理)的密码(默认为空),“New root password”如果要修改,就在此填入新密码(如果是重装,并且之前已经设置了密码,在这里更改密码可能会出错,请留空,并将“Modify Security Settings”前面的勾去掉,安装配置完成后另行修改密码),“Confirm(再输一遍)”内再填一次,防止输错。

“Enable root access from remote machines(是否允许root用户在其它的机器上登陆,如果要安全,就不要勾上,如果要方便,就勾上它)”。

最后“Create An Anonymous Account(新建一个匿名用户,匿名用户可以连接数据库,不能操作数据,包括查询)”,一般就不用勾了,设置完毕,按“Next”继续。

21、确认设置无误,如果有误,按“Back”返回检查。

按“Execute”使设置生效。

22、设置完毕,按“Finish”结束mysql的安装与配置——这里有一个比较常见的错误,就是不能“Start service”,一般出现在以前有安装mysql的服务器上,解决的办法,先保证以前安装的mysql服务器彻底卸载掉了;不行的话,检查是否按上面一步所说,之前的密码是否有修改,照上面的操作;如果依然不行,将mysql安装目录下的data文件夹备份,然后删除,在安装完成后,将安装生成的data文件夹删除,备份的data文件夹移回来,再重启mysql服务就可以了,这种情况下,可能需要将数据库检查一下,然后修复一次,防止数据出错。

[IMG]/upload/2008/3/mysql-install-22.jpg[/IMG]
至此MySQL5安装完成。

j。

相关文档
最新文档