Install mysql in Zip format

Run mysql zip file in windows

1. First create the my.ini
2. Add the paths in myini file
   [mysqld]
# set basedir to your installation path
basedir=E:\\mysql
# set datadir to the location of your data directory
datadir=E:\\mydata\\data
3. Run mysqld
   It will find defaultly my.ini file.
   mysqld   --initialize or --initialize-insecure
 
   After completes it created some files in data folder
4. Run sql server
   mysqld  --console
   mysql -u root  //Default user root

https://dev.mysql.com/doc/refman/5.7/en/windows-create-option-file.html

Reset the password

1. Create file mysql-ini.txt and add these
2. Add contents  mysql-ini.txt
  ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
  SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
based on versions

Run command
mysqld --init-file=D:\\docs\\databases\\sql\\mysql-5.7.10-winx64\\mysql-5.7.10-winx64\\mysql-ini.txt --console

https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html

Comments

Popular posts from this blog

Proxy setting in java

Using logstash to import csv json files into elasticsearch

Kibana 4 Installation and Run as a service in ubuntu