Thursday 22 March 2018

Install MYSQL on MAC

1) Install MySQL server from https://dev.mysql.com/downloads/file/?id=475582
      a) In the process of installation default password is generated. Take a note of it.

2) Install MySQLWorkbench from https://dev.mysql.com/downloads/file/?id=412161

3)Open command prompt and type below commands:


a) cd /usr/local/mysql/bin/
b) ./mysql -u root -p
    <<it asks for the password, enter the default password captured from step-1 >>
c) To change the password

SET PASSWORD = PASSWORD('<<new password>>');
d)use mysql;
e)SET PASSWORD FOR 'root'@'localhost' = PASSWORD('<<new password>>');

Sunday 11 March 2018

git - revert commits

just before push, if we have identified if there any files which has been committed and not yet pushed, we can revert that commit using below commit:


git reset HEAD~1


can run this command multiple times, if there are multiple commits. Once we push the code we can run this code.

This command just reverts the commits, doesn't change the files.