install mysql on windows using zip file
Jun 28, 2025 am 01:53 AM1. Unzip the ZIP file to the appropriate path; 2. Create my.ini configuration file and initialize it; 3. Install MySQL as Windows service and start it; 4. Log in and modify the initial password. First download the ZIP version and unzip it to a path without Chinese and spaces, such as C:\mysql; then create the my.ini file in the root directory, configure the basedir and datadir paths, and execute mysqld --initialize --console to generate the data directory and temporary password; then run cmd as an administrator, enter the bin directory to execute the mysqld -install registration service, and then start the service with net start mysql; finally use the mysql -u root -p command to log in and execute the ALTER USER statement to modify the root user password to complete the installation and basic security settings.
MySQL is usually installed on Windows in a way to install packages (MSI), but if you download the ZIP zipped package version, it means you may want a lighter and more customizable installation method. This method is suitable for users with certain hands-on capabilities, such as developers or system administrators.

Here are a step-by-step method to teach you how to install MySQL using ZIP files on Windows.

Unzip the ZIP file to the appropriate location
First, download the ZIP format compressed package from the official MySQL website (usually the option "Windows (x86, 64-bit), ZIP Archive"). After the download is complete, unzip it to your favorite location, such as:
C:\mysql
or:

D:\software\mysql
It is recommended not to include Chinese and spaces in the path to avoid subsequent configuration errors.
After unzipping, you will see several folders, including bin
, docs
, include
, etc. There are many executable programs in the bin
directory, such as mysqld.exe
and mysql.exe
, which are what we need to start the database.
Configure my.ini file and initialization settings
The ZIP version does not have a my.ini
configuration file by default, you need to create one manually. You can create a new my.ini
file in the MySQL root directory, with the content roughly as follows:
[mysqld] basedir=C:/mysql datadir=C:/mysql/data port=3306 server-id=1
Pay attention to changing basedir
and datadir
to your actual installation path. The data
folder will be automatically generated when initialized.
Then open the command prompt (CMD) as an administrator, enter the bin
directory, and run the initialization command:
mysqld --initialize --console
This command will generate a temporary password, write it down, and you will use it after logging in.
Install as Windows Service and start
For easy management, you can install MySQL as a Windows service, which can run automatically as the system starts.
Also executed in CMD:
mysqld -install
If you prompt "Service successfully installed", it means that it is successful.
Then start the service:
net start mysql
If you want to automatically start MySQL every time you boot up in the future, this step is done. If you do not want to start automatically, you can use the command to control it manually.
Log in and modify the initial password
After starting the service, you can use the following command to log in to MySQL:
mysql -u root -p
Enter the temporary password generated when it was initialized just now.
The first thing to do after logging in is to modify the password, the syntax is as follows:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Your new password';
Remember to replace '你的新密碼'
with a strong password you set yourself.
Basically these are the steps. Although it takes a few more steps than graphical installation, it is more flexible and more suitable for advanced users. The whole process is not complicated, but some details are easy to ignore, such as path format, permission issues and service registration. As long as you take it step by step, there should be no problem.
The above is the detailed content of install mysql on windows using zip file. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

ToassignadriveletterinWindows,useDiskManagementorCommandPrompt.2.InDiskManagement,pressWindows X,selectDiskManagement,right-clickthevolumewithoutaletter,choose"ChangeDriveLetterandPaths",clickAdd,selectaletter(avoidA:orB:),andclickOK.3.Alte

UseCommandPromptbytypingsysteminfo|find"OriginalInstallDate"toinstantlyseetheoriginalWindowsinstallationdate.2.Alternatively,usePowerShellwith(Get-ItemProperty-Path"HKLM:\SOFTWARE\Microsoft\WindowsNT\CurrentVersion").InstallDatean

ToenabletheGuestaccountinWindows10/11,openCommandPromptasAdministratorandrun"netuserGuest/active:yes".2.TheGuestaccounthaslimitedpermissionsandcannotinstallappsorchangesystemsettings.3.Optionally,createastandarduseraccountviaSettings>Acc

UseLatencyMontoidentifyhighDPC/ISRtimesandpinpointproblematicdrivers.2.UpdateorrollbacknetworkandWi-Fidrivers,especiallyfromIntel,Realtek,orKiller,anddisableunusedBluetooth.3.Updateordisablehigh-DPChardwaredriverssuchasUSB,audio,graphics,orNVMecontro

OpenBackupandRestoreviaWindows S,typeBackupandRestore,clickCreateasystemimage.2.Savetheimagetoanexternalharddrive(recommended),selectitfromthedropdown,andclickNext.3.Confirmincludeddrives(systemreservedandC:bydefault),addothersifneeded,thenclickNext.

InstallIISandFTPcomponentsviaWindowsFeatures,ensuringFTPService,FTPExtensibility,andIISManagementConsoleareenabled.2.CreateadedicatedFTPfolder(e.g.,C:\FTP),grantIIS_IUSRSModifypermissions,andoptionallyaddspecificusers.3.InIISManager,addanFTPsitebyspe

InstallthedesiredlanguagepackviaSettings→Time&Language→Language®ion,ensuring"SetasmyWindowsdisplaylanguage"isselected.2.Changethesystemdisplaylanguageinthesamemenuandrestart.3.OpenControlPanel→Region→Administrativetab,click"

TochangedesktopiconsizeinWindows,right-clickanemptyareaofthedesktop,hoverover"View",andselectLarge,Medium,orSmalliconsforimmediateresizing.2.Forfinercontrol,holdtheCtrlkeyandscrollthemousewheelupordowntodynamicallyadjusticonsize.3.Toscaleic
