Skip to main content

How to Configure and Initialize MySQL 8> on Windows Without Installation

How to Configure and Initialize MySQL (8 or later version) on Windows without Installation

If you need to use MySQL on Windows but don't want to go through the hassle of installing it, you can still use it by downloading the ZIP archive version of MySQL. Here are the steps to configure and initialize MySQL:

  1. Download the latest ZIP archive for Windows from the official MySQL website (https://dev.mysql.com/downloads/mysql/).
  2. Extract the ZIP archive to a folder of your choice (e.g., C:\mysql).
  3. Create a new file named my.ini in the MySQL folder (e.g., C:\mysql) with the following content:
[mysqld]
basedir=C:/mysql
datadir=C:/mysql/data
port=3306

Make sure to replace the basedir and datadir values with the path to your MySQL folder.

  1. Create a new folder named data inside the MySQL folder (e.g., C:\mysql\data).
  2. Open a command prompt as an administrator and navigate to the MySQL folder (e.g., cd C:\mysql).
  3. Initialize the MySQL data directory by running the following command:
bin\mysqld --initialize-insecure --console

The --initialize-insecure option will initialize the data directory without setting a root password, so you can access the MySQL server without a password. The --console option will display the initialization process in the console window.

  1. Start the MySQL server by running the following command:
bin\mysqld --console

The --console option will display the MySQL server output in the console window.

  1. Open another command prompt as an administrator and navigate to the MySQL folder (e.g., cd C:\mysql).
  2. Connect to the MySQL server by running the following command:
bin\mysql -u root

This will connect you to the MySQL server as the root user without a password.

  1. Set a root password by running the following command:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

Replace new_password with your desired root password.

That's it! You have now successfully configured and initialized MySQL on Windows without installation.

 

 

 

 

 

 

 

 

 

________________________________________________________

OLDER GUIDE

mysql 5.7> simple initialization and password setting without installation - no configuration needed

 

Note: this works for mysql version 5.7>

Download (almost) any zip package of mysql

ex.: I download mysql-5.7.26-winx64.zip

Unzip the content in the directory that you prefer.

ex.: G:\mysql-5.7.26-winx64\

Download  this zip file
Extract the batch files and copy them in your mysql folder  (data folder should be missing - and it's ok)

You can run "mysql-first-run.bat" to initialize the data folder and set the default password for the "root" user.

The password will be: toor


 
If everything is ok you can run "mysql_start.bat"
A command prompt will pop up.
To close the mysql server just press ctrl+C from the prompt.























Comments

Popular posts from this blog

Moodle 3.8.1+ - path leak via errors in several files

Moodle 3.8.1+ ----------------------------------------------- File: admin/mailout-debugger.php #!/usr/bin/php Notice : Disabled. in \admin\mailout-debugger.php on line 73 File: admin/settings/appearance.php Notice : Undefined variable: hassiteconfig in \admin\settings\appearance.php on line 10 Fatal error : Uncaught Error: Call to undefined function has_any_capability() in \admin\settings\appearance.php:10 Stack trace: #0 {main} thrown in \admin\settings\appearance.php on line 10 File: admin/settings/badges.php Notice : Undefined variable: hassiteconfig in \admin\settings\badges.php on line 30 Fatal error : Uncaught Error: Call to undefined function has_any_capability() in \admin\settings\badges.php:30 Stack trace: #0 {main} thrown in \admin\settings\badges.php on line 30 File: admin/settings/courses.php Notice : Undefined variable: hassiteconfig in \admin\settings\courses.php on line 32 Fatal error : Uncaught Error: Call to undefined function

2022 - Remove (the too many) Ads from Memu launcher

Simple method Download from pureapk "MEmu Launcher2" ex: MEmu Launcher2_v6.0.9_apkpure.com Install "System app remover" (root) remove from system apps the "memu launcher 2" import the "purified" MEmu Launcher2 apk with the Memu utility ("apk" on the right toolbar) Longer method Install "Export Apk" Export the memu launcher2  Install purify https://github.com/echo-devim/purify/raw/master/Purify.apk use purify with the exported memu launcher 2 Install "System app remover" (root) remove from system apps the "memu launcher 2" import the "purified" MEmu Launcher2 apk with the Memu utility ("apk" on the right toolbar)