Skip to content

Instantly share code, notes, and snippets.

@ultrasamad
Created May 5, 2020 13:33
Show Gist options
  • Save ultrasamad/236a931b6e3b7c875a77dd4fda7d55ec to your computer and use it in GitHub Desktop.
Save ultrasamad/236a931b6e3b7c875a77dd4fda7d55ec to your computer and use it in GitHub Desktop.
Installation and setup of MySQL on windows

Getting started with mysql installation and configuration

Installation

  • Download and install the latest version of Visual C++ redistributable if it's not already installed
  • Download and extract mysql archive file and extract to somewhere on your filesytem
  • Add a path to the bin directory of your mysql installation to your environment path
  • Create a my.ini file in the bin directory with the following contents
    [mysqld]
    //Set basedir to your installation path
    basedir=c:/xampp/mysql
    
    //Set datadir to the location of your data directory
    datadir=c:/xampp/mysql/data
    
    innodb_buffer_pool_size = 1024M
    
  • Initialize data directory with mysqld --initialize --console
  • Login with the generated temporal password
  • Reset your password with: ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment