在Windows下安裝MySQL
Jun 21, 2016 am 09:13 AMmysql|window
本文只討論如何在Windows NT 4.0或Windows 20000下安裝MySQL。
我用的MySQL為mysql-shareware-3.22.32-win.zip。
一、軟件下載
????您可以從下列站點(diǎn)下載Windows版本的MySQL數(shù)據(jù)庫(kù)服務(wù)器軟件:
???????http://www.mysql.com/download_win.html
???????http://chat.hn.cninfo.net/soft/
二、軟件安裝
????您可以從http://www.mysql.com/Manual/manual.html#Win32獲取詳細(xì)的安裝
方法。您可以用下面的方法進(jìn)行安裝:
????1、將下載的軟件用WinZIP等.zip解壓縮工具解壓縮到一個(gè)臨時(shí)目錄,如C:\TEMP,
在這里用$INSTALL_TEMP標(biāo)識(shí);
????2、雙擊$INSTALL_TEMP目錄下的SETUP.EXE進(jìn)行安裝,安裝的時(shí)候,系統(tǒng)要您確定
安裝的目的地,缺省為c:\mysql,在這里用$MYSQL標(biāo)識(shí);
????3、將$MYSQL目錄下的my-example.cnf文件拷貝為c:\my.cnf,用文本編輯器打開(kāi)
c:\my.cnf,把該文件中的#basedir = d:/mysql/改為basedir = $MYSQL,$MYSQL
用您那里的安裝目的地目錄代替;
????4、運(yùn)行cmd或command,打開(kāi)command窗口;
????5、在command窗口中進(jìn)入$MYSQL\bin目錄,如:cd c:\mysql\bin;
????6、運(yùn)行mysqld-shareware --install,這樣在Windows的服務(wù)中就多了一個(gè)名為
MySQL的服務(wù),您可以用Windows的服務(wù)管理程序來(lái)啟動(dòng)或停止服務(wù);
????7、現(xiàn)在請(qǐng)用Windows的服務(wù)管理程序啟動(dòng)MySQL數(shù)據(jù)庫(kù)服務(wù);
????8、MySQL安裝完后,root賬號(hào)的密碼為空,這時(shí)候您可以用下面的方法來(lái)改變r(jià)oot
賬號(hào)的密碼:mysqladmin -u root -p password ,它會(huì)要求您輸入root賬
號(hào)的舊密碼;
????9、這時(shí)您就可以用下面的方法來(lái)測(cè)試是否已經(jīng)安裝成功了:mysql -u root -p,
它會(huì)要求您輸入root賬號(hào)的密碼,如果MySQL已經(jīng)安裝成功,您就會(huì)看到下面這段話:
??????????C:\mysql\bin>mysql -u root -p
??????????Enter password: ****
??????????Welcome to the MySQL monitor.??Commands end with ; or \g.
??????????Your MySQL connection id is 3 to server version: 3.22.32-shareware-debug
??????????Type 'help' for help.
??????????mysql>
???????這時(shí)您可以在mysql>提示符下按這樣的方法進(jìn)行測(cè)試:
??????????mysql> show databases
??????????????-> go
??????????+----------+
??????????| Database |
??????????+----------+
??????????| mysql????|
??????????| test?????|
??????????+----------+
??????????2 rows in set (0.05 sec)
??????????mysql> use test
??????????Database changed
??????????mysql> create table test(name char(50))
??????????????-> go
??????????Query OK, 0 rows affected (0.12 sec)
??????????mysql> insert into test(name) values('朋友,您好,歡迎使用MySQL')
??????????????-> go
??????????Query OK, 1 row affected (0.07 sec)
??????????mysql> select * from test
??????????????-> go
??????????+---------------------------+
??????????| name??????????????????????|
??????????+---------------------------+
??????????| 朋友,您好,歡迎使用MySQL |
??????????+---------------------------+
??????????1 row in set (0.02 sec)
??????????mysql> exit
??????????Bye
??????????C:\mysql\bin>
附:
????MySQL下載網(wǎng)址
???????http://www.mysql.com/download_win.html
???????http://chat.hn.cninfo.net/soft/
????MySQL安裝指南
???????http://www.mysql.com/Manual/manual.html#Win32
????MySQL手冊(cè)
???????http://www.mysql.com/Manual/manual_toc.html
???????http://www.mysql.com/Manual/manual.html

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)

Hyper-VcanbeenabledonWindowsPro,Enterprise,orEducationeditionsbymeetingsystemrequirementsincluding64-bitCPUwithSLAT,VMMonitorModeExtension,BIOS/UEFIvirtualizationenabled,andatleast4GBRAM.2.EnableHyper-VviaWindowsFeaturesbyopeningoptionalfeatures,chec

Checkifthetouchpadisdisabledbyusingthefunctionkey(Fn F6/F9/F12),adedicatedtogglebutton,orensuringit’sturnedoninSettings>Devices>Touchpad,andunplugexternalmice.2.UpdateorreinstallthetouchpaddriverviaDeviceManagerbyselectingUpdatedriverorUninstal

UseSystemInformation(msinfo32)forthemostdetailedspecsincludingCPU,RAM,systemtype,BIOS,motherboard,andWindowsversion.2.CheckSettings>Aboutforaquickoverviewofprocessor,RAM,deviceID,andsystemtype.3.OpenTaskManager’sPerformancetabtoseereal-timedataonC

To restore Windows system fonts, please first check whether you have modified the font using a third-party tool. If so, reset the "Restore Default" option of the tool; if no tool is available, you can manually locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Fonts through the registry editor to ensure that the font value of SegoeUI is correctly pointed to segoeui.ttf and other files, and back up the registry if necessary; then run the command prompt as an administrator and execute the sfc/scannow command to repair the system files; finally go to Settings → Personalization → Theme, and select Windows to light it by default.

First, run Windows Update troubleshooter to automatically repair common problems, 1. Run Windows Update troubleshooter; 2. Check network connection and proxy settings to ensure that you can access the Windows Update Server; 3. Use DISM command to repair component storage, and specify the local Windows ISO source if necessary; 4. Manually specify the ISO source path when installing optional functions through PowerShell; 5. Reset Windows Update component services and clear cache; 6. Run sfc/scannow and chkdsk to check system and disk errors; finally ensure that the system is updated to the latest and use official ISO first to solve the problem of missing files, and in most cases, you can successfully repair 0x800f0954 errors

StartwithWindowsMemoryDiagnosticbyrunningmdsched.exetocheckforRAMissueseitherimmediatelyoratnextboot,thenreviewresultsinEventViewerunderWindowsLogs>SystemforMemoryDiagnostics-Results.2.UseTaskManager(Ctrl Shift Esc)tochecktotalandcurrentmemoryusag

TomanagecertificatesinWindows,usecertmgr.mscforuser-leveltasksorMMCwiththeCertificatessnap-inforcomputer-widechanges.2.ImportcertificatesviatheCertificateImportWizard,selectingtheappropriatestore—PersonalforSSL/TLS,TrustedRootCAonlyfortrustedCAs.3.Ex

Windows does not have a direct “efficiency mode” switch, but similar effects can be achieved through a variety of built-in functions. 1. Use Task Manager: Press Ctrl Shift Esc to open, right-click the target application and select "Go to Details", then right-click the process to select "Set Priority" to "Lower than Normal" or "Low" to reduce CPU usage, and disable unnecessary power-on and self-start programs in the "Startup" tab. 2. Enable battery saver or power efficiency mode: Click the battery icon in the taskbar to turn on the battery saver, or automatically enable it through the "Settings > System > Power and Battery" setting, which can limit background activity, slow application synchronization and reduce visual effects. 3. Manage background application permissions: Go to "Settings>
