sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install terraform Verify the installation terraform -help Enable tab completion touch ~/.bashrc OR touch ~/.zshrc Install the autocomplete package terraform -install-autocomplete...

Read More

* Take dump of all databases:
# mysqldump --skip-lock-tables -A > alldb.sql * * Check where MySQL keeps its files(in my case it's /var/lib/mysql/):
# mysql -NBe "SELECT @@datadir" * /var/lib/mysql/ * * Stop MySQL
# mysqladmin shut * * Move old MySQL files to safe place 
# mv /var/lib/mysql /var/lib/mysql.old * * Create new system database
# mkdir /var/lib/mysql * # sudo apt-get install mysql-server * * Start MySQL
# /etc/init.d/mysql start * * Restore the dump

Read More

There are two ways to make this happen. The first is using the semicolon like so: sudo apt-get update; sudo apt-get upgrade -y  The only problem with that method is that the second command will run, even if the first command fails. In those cases, you'd run the command: sudo apt-get update && sudo apt-get upgrade -y Both versions of the command will run, but the second form will only run...

Read More

MySQL 5.7 and above Creating a Superuser for phpMyAdmin In terminal, log in to MySQL as root. sudo mysql -p -u root CREATE USER 'pmauser'@'localhost' IDENTIFIED BY 'password_here'; Now we will grant superuser privilege to our new user pmauser. GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'localhost' WITH GRANT OPTION; You should now be able to access phpMyAdmin using this new user account....

Read More