Tuesday 28 May 2019

How to connect ssh using PPK file into Cpanel from terminal Ubuntu

Connection command without PPK file
ssh username@146.66.87.208 -p18765
 Connection command with PPK file
ssh -i privatekey.ppk username@146.66.87.208 -p18765 (if not connect with PPK or give an error like "Load key "privatekey.ppk": invalid format" so please use the direct file without PPK format (See the following screenshot) ) (Supported port : 22, 18765, 18675)

Thursday 9 May 2019

Access denied for user 'root'@'localhost' even password is correct

Error : SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket
Step 1 : For backup = cp -rfv /var/lib/mysql /var/lib/mysql$(date +%s)
Step 2 : sudo /etc/init.d/mysql stop
Step 3 : sudo mysqld_safe --skip-grant-tables & (If process will not complete after 5 minuts keep this window open and open another terminal window)
Step 4 :  mysql -u root -p 
Step 5 : FLUSH PRIVILEGES;
Step 6 : UPDATE user SET Grant_priv = 1, Super_priv = 1 WHERE user = 'root'
Step 7 : update user set password=PASSWORD("Franki3r0s3") where User='root';
Step 8 : GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' IDENTIFIED BY 'anki8f0s3';

Additional commands : 
1. mysql# show users;
2. mysql# SELECT User FROM mysql.user;
3. ps -e | grep mysqld
4. kill -kill 16300
5. ps -x