Reset root password of MySQL 5.7 in Ubuntu 16.04

Step 1: Stop MySQL

sudo service mysql stop

Step 2: Make MySQL service directory
sudo mkdir /var/run/mysqld

Step 3: Give permission to write to the service directory
sudo chown mysql: /var/run/mysqld

Step 4: Start MySQL manually, without permission checks or networking
sudo mysqld_safe –skip-grant-tables –skip-networking &

Step 5: Log in without a password
mysql -uroot mysql

Step 6: Update the password for the root user

UPDATE mysql.user SET authentication_string=PASSWORD(‘YOURNEWPASSWORD’), plugin=’mysql_native_password’ WHERE User=’root’ AND Host=’%’;
EXIT;

Step 7: Turn off MySQL
sudo mysqladmin -S /var/run/mysqld/mysqld.sock shutdown

Step 8: Start MySQL service
sudo service mysql start

 

You have done

Advertisements

Installing Hyperledger Composer (Ubuntu)

To install Installing Hyperledger Composer, follow tutorial here

Issues in above tutorial:

In Installing pre-requisites, run command
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
instead
curl -O https://hyperledger.github.io/composer/prereqs-ubuntu.sh

In Installing components, run command
export NODE_PATH=$NODE_PATH:`npm root -g`
before running command
npm install -g yo

Note: To Installing Hyperledger Composer on Ubuntu 18.04 LTS (Bionic)
After running commands
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh

Edit prereqs-ubuntu.sh file
and replace line
declare -a versions=(‘trusty’ ‘xenial’ ‘yakkety’);
with
declare -a versions=(‘trusty’ ‘xenial’ ‘yakkety’ ‘bionic’);