search
HomeDatabaseMysql TutorialMYSQL5.6数据库ZIP安装以及VS中使用注意事项_MySQL

bitsCN.com

   先挂资源,下载地址: http://download.softagency.net/MySQL/Downloads/。

   找到MYSQL5.6,两个版本看系统而定我下的是64位的:http://download.softagency.net/MySQL/Downloads/MySQL-5.6/mysql-5.6.16-winx64.zip。解压放入自己需要存入的地方,我的路径是D:/SDT/mysql5.6.16_x64,如下图所示:

     解压后目录里面的文件可能会和图片里有点不一样,没有my.ini和my_default_old.ini这个两个文件,并且有一个my_default.ini文件。这是接下来要弄的,把my_default.ini文件在当前文件夹下复制粘贴一份,并把其它一个文件名改成my.ini,另一个可以不管或改成我上面样子。

my.ini的配置文件需要改两处理地方:

basedir = D://SDT//mysql5.6.16_x64
datadir = D://SDT//mysql5.6.16_x64//data

port = 3306
#自定义主机ID识别符,用于主从或多服务器之间识别,为 一个 int 类型
server_id = 1

basedir = D:/SDT/mysql5.6.16_x64
datadir = D:/SDT/mysql5.6.16_x64/data

port = 3306
#自定义主机ID识别符,用于主从或多服务器之间识别,为 一个 int 类型
server_id = 1

这里需要注意的就是正斜杠是两个,反斜杠是一个,任意一种都行,其它可改可不改,我的完整配置如下:

# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the# *** default location during install, and will be replaced if you# *** upgrade to a newer version of MySQL.[mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin# These are commonly set, remove the # and set as required.basedir = D://SDT//mysql5.6.16_x64datadir = D://SDT//mysql5.6.16_x64//dataport = 3306#自定义主机ID识别符,用于主从或多服务器之间识别,为 一个 int 类型server_id = 1character_set_server=utf8# 最大连接数量max_connections = 100#CREATE TABLE 语句的默认表类型,如果不自己指定类型,则使用下行的类型default-storage-engine = InnoDB# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.join_buffer_size = 128Msort_buffer_size = 2Mread_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

   接下来是在环境变量”path“里加入数据库根目录路径,如我的就是"D:/SDT/mysql5.6.16_x64/bin"。

     打开cmd控制台,win7系统要以管理员权限打开,输入"D:/SDT/mysql5.6.16_x64/bin/mysqld.exe --install mysql5",一定要以全路径,正常操作应该是显示安装成功的英文。这里的命令大概意思是建立一个mysql5的数据库服务实例。如果不以全路径等下会启动不了,想知道为什么,可以在运行里输入"services.msc"看下我们建的这个mysql5服务的运行目录就明白了。

    接着在CMD里输入"net start mysql5",启动我们刚才建的"mysql5"实例,正常操作应该是显示数据服务成功开启的英文。

   下一步配置root密码,在cmd里输入"mysql -u root -p",因为数据库默认root是没有密码的,所以直接回车两下就可以下,接下来输入"update user set password=PASSWORD(‘123456’) where User='root';"其中"123456"是为要更新的密码,更据实际改下就行了。

    数据库目前是以基本配置完了,接下来可以下一个“MySQLWorkbench”,我下的是6.0.7版本的,资源还是最上面的目录里去找。解压放入自己需要的文件目录,这里需要注意的是目录路径最好是英文,要不可能报错,反正我的WIN7放中文目录里是出错,报的是好像是要什么ansi环境。打开MySQLWorkbench.exe,Databse->conect to database,填入用户名和密码及上面的root和123456,就可以图形界面操作mysql了。

    接下来VS里集成mysql,网上找了一把发现6.7xx以上的.net_connecter已经不vs集成插件了,需要用mysql-install这个工具下载地址:

 

http://cdn.mysql.com/Downloads/MySQLInstaller/mysql-installer-community-5.6.16.0.msi,这个就不说了,看着点就可以了。

再来一个web版在线安装版:

http://cdn.mysql.com/Downloads/MySQLInstaller/mysql-installer-web-community-5.7.3.0-m13.msi

 

 

 

   

bitsCN.com
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL BLOB : are there any limits?MySQL BLOB : are there any limits?May 08, 2025 am 12:22 AM

MySQLBLOBshavelimits:TINYBLOB(255bytes),BLOB(65,535bytes),MEDIUMBLOB(16,777,215bytes),andLONGBLOB(4,294,967,295bytes).TouseBLOBseffectively:1)ConsiderperformanceimpactsandstorelargeBLOBsexternally;2)Managebackupsandreplicationcarefully;3)Usepathsinst

MySQL : What are the best tools to automate users creation?MySQL : What are the best tools to automate users creation?May 08, 2025 am 12:22 AM

The best tools and technologies for automating the creation of users in MySQL include: 1. MySQLWorkbench, suitable for small to medium-sized environments, easy to use but high resource consumption; 2. Ansible, suitable for multi-server environments, simple but steep learning curve; 3. Custom Python scripts, flexible but need to ensure script security; 4. Puppet and Chef, suitable for large-scale environments, complex but scalable. Scale, learning curve and integration needs should be considered when choosing.

MySQL: Can I search inside a blob?MySQL: Can I search inside a blob?May 08, 2025 am 12:20 AM

Yes,youcansearchinsideaBLOBinMySQLusingspecifictechniques.1)ConverttheBLOBtoaUTF-8stringwithCONVERTfunctionandsearchusingLIKE.2)ForcompressedBLOBs,useUNCOMPRESSbeforeconversion.3)Considerperformanceimpactsanddataencoding.4)Forcomplexdata,externalproc

MySQL String Data Types: A Comprehensive GuideMySQL String Data Types: A Comprehensive GuideMay 08, 2025 am 12:14 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,idealforconsistentlengthdatalikecountrycodes;2)VARCHARforvariable-lengthstrings,suitableforfieldslikenames;3)TEXTtypesforlargertext,goodforblogpostsbutcanimpactperformance;4)BINARYandVARB

Mastering MySQL BLOBs: A Step-by-Step TutorialMastering MySQL BLOBs: A Step-by-Step TutorialMay 08, 2025 am 12:01 AM

TomasterMySQLBLOBs,followthesesteps:1)ChoosetheappropriateBLOBtype(TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB)basedondatasize.2)InsertdatausingLOAD_FILEforefficiency.3)Storefilereferencesinsteadoffilestoimproveperformance.4)UseDUMPFILEtoretrieveandsaveBLOBsco

BLOB Data Type in MySQL: A Detailed Overview for DevelopersBLOB Data Type in MySQL: A Detailed Overview for DevelopersMay 07, 2025 pm 05:41 PM

BlobdatatypesinmysqlareusedforvoringLargebinarydatalikeImagesoraudio.1) Useblobtypes (tinyblobtolongblob) Basedondatasizeneeds. 2) Storeblobsin Perplate Petooptimize Performance.3) ConsidersxterNal Storage Forel Blob Romana DatabasesizerIndimprovebackupupe

How to Add Users to MySQL from the Command LineHow to Add Users to MySQL from the Command LineMay 07, 2025 pm 05:01 PM

ToadduserstoMySQLfromthecommandline,loginasroot,thenuseCREATEUSER'username'@'host'IDENTIFIEDBY'password';tocreateanewuser.GrantpermissionswithGRANTALLPRIVILEGESONdatabase.*TO'username'@'host';anduseFLUSHPRIVILEGES;toapplychanges.Alwaysusestrongpasswo

What Are the Different String Data Types in MySQL? A Detailed OverviewWhat Are the Different String Data Types in MySQL? A Detailed OverviewMay 07, 2025 pm 03:33 PM

MySQLofferseightstringdatatypes:CHAR,VARCHAR,BINARY,VARBINARY,BLOB,TEXT,ENUM,andSET.1)CHARisfixed-length,idealforconsistentdatalikecountrycodes.2)VARCHARisvariable-length,efficientforvaryingdatalikenames.3)BINARYandVARBINARYstorebinarydata,similartoC

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment