How To Start Mysql Server In Windows 10
In this article, you volition see how do y'all install MySQL server 8.0.27 on the Windows x operating system using a zip archive file.
Software Dependency
- MySQL Server viii.0.27 [zip]
- Windows 10
How do we install MySQL server on Windows 10(64-fleck)?
Steps to install MySql server on windows 10 64-fleck operating system:
- Download MySql aught Archive file
- Extract the Goose egg Archive File
- Configure system environs variables
- Initialize the data directory and database
- Kickoff MySQL Service and Connect to the Server
Download MySQL aught Archive file
Get-go, we have to download the goose egg archive file from its official website download page. On the download folio, select the operating system as Microsoft Windows and cull Windows (x86, 64-fleck), ZIP Archive, and so click on the download button as you can run into in the below prototype.
One time yous click on the download button, information technology will open the beneath folio. Here, you just need to click on the link No cheers, just start my download to first downloading.
Extract the Zip Archive File
In one case you download the zip archive, yous have to extract it at the desired location. In this article, we have extracted it at C:\MySQL\mysql-8.0.27-winx64
Create MySQL configuration file
The configuration file is used to initiate the MySQL database server. Create a new my.ini file and a data Folder inside the base of operations directory.
Base of operations directory: C:/MySQL/mysql-eight.0.27-winx64
Now, put the following content in the my.ini document. You can use a plain text editor(eg. notepad or notepad++) to create this file.
[mysqld] # set basedir to your installation path basedir="C:/MySQL/mysql-8.0.27-winx64" # set up datadir to the location of your information directory datadir="C:/MySQL/mysql-8.0.27-winx64/data" # Fix port port=3306 # Maximum connections immune max_connections=200 # Number of connection failures allowed . max_connect_errors=x # The character set used by the server defaults to UTF8 character-prepare-server=utf8 # The default storage engine that will be used when creating a new tabular array default-storage-engine=INNODB [mysql] # Ready up mysql Client default grapheme set default-grapheme-set=utf8 [client] # Gear up mysql The default port when the client connects to the server port=3306 default-character-set=utf8
Configure system environment variables
System Environs Variables path:
Right click on MyComputer -> backdrop -> Advanced System Settings -> Environment variables
Now, click on the Environment Variables push > add MYSQL_HOME & Path variables with the following value:
Variable name | Variable value |
---|---|
MYSQL_HOME | C:/MySQL/mysql-8.0.27-winx64 |
Path | %MYSQL_HOME%\bin |
Initialize the information directory and database
The Zilch archive of MySQL does non include the data directory; therefore, we must initialize it manually. When nosotros initialize MySQL, it creates the MySQL system database files and system tables in the specified information directory.
Data directory: C:/MySQL/mysql-8.0.27-winx64/data
To initialize MySQL and create a MySQL database, we must run the mysqld command with the –initialize or –initialize-insecure selection. The meaning of using these options are as follow:
–initialize | This option is considered secure by default. In this case, MySQL generates a random root countersign. Once installation completes, the root password will exist expired, and you must create a new root countersign. |
–initialize-insecure | In this option, we exercise non need to specify the root password. It is considered that the user volition create the root password earlier moving on to production. |
Here, nosotros volition use the –initialize choice to initialize it.
At present, open up the control prompt as an ambassador user. Jump to the C:/MySQL/mysql-8.0.27-winx64/bin directory, and run the following command:
C:\MySQL\mysql-8.0.27-winx64\bin>mysqld --initialize
The above command will accept a few minutes to initialize the MySQL database. To verify the successful initialization, open the data directory(C:/MySQL/mysql-viii.0.27-winx64/data). You can meet the data directories and system database files have been created, which indicates that the initialization was completed successfully.
During the initialization process, MySQL writes the logs in the data directory of MySQL. Yous can employ information technology to review them or diagnose any issue. The file proper name format of the error log is[Host Name].err. In this file, nosotros tin run into our randomly created password for the user root equally follow:
A temporary password is generated for root@localhost: k_?W)BxTo3q2
NOTE:
If you got any .dll file missing error while initializing mysql, then visit the https://www.dll-files.com/ to download and paste it at location C:\Windows\System32 in your computer.
Start MySQL Service and Connect to the Server
To start the MySQL service, run the post-obit command:
C:\MySQL\mysql-eight.0.27-winx64\bin>mysqld
Now the service has been started successfully. Don't close this command prompt window until yous want to cease it.
At present, connect to the MySQL server using mysql command-line tools. Start some other session of command prompt and run the post-obit command. Provide the randomly created password here,
mysql -u root -p
You are now connected to the MySQL server.
If yous want to modify the password for the root user, do it as follow:
mysql> ALTER USER root@localhost IDENTIFIED BY '123456';
Determination
In this commodity, you have seen the installation process step by step using the zilch archive file. It is completely different from the installation process of MySQL using MSI installer. The installer is a GUI tool that makes the installation process much easier than the MySQL zero archive installation process.
Related manufactures:
- JDK eight Installation on Windows 10 Operating Arrangement
- How to install and configure Tomcat Server in Eclipse?
How To Start Mysql Server In Windows 10,
Source: https://javacodepoint.com/install-mysql-server-8-0-27-zip-archive-on-windows-10/
Posted by: rimmerflon1980.blogspot.com
0 Response to "How To Start Mysql Server In Windows 10"
Post a Comment