ssh

Sharing SSH session with screen

Sometimes, it is particularly illuminating to see how something is setup in SSH by another person in remote place. Particularly, we want the equivalent of a bunch of people huddled in front of a monitor while one person types. Surprisingly, this can be accomplished quite easily in Linux. Actually, this is one step better, anyone can type in the command line at any time, so no one actually monopolizes the keyboard. One person can create the screen by selecting a name for the session and then typing sudo screen -L -S

Tags:

Simple method to reset MySQL or MariaDB root password in CLI

To reset your MySQL root password in SSH, simply run the following sequence of commands:


/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("newrootpassword") where User='root';
flush privileges;
quit
/etc/init.d/mysqld stop
/etc/init.d/mysqld start

On Fedora 7.x based systems, which come with MariaDB instead of MySQL, run:

<?php
systemctl stop mariadb
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("newrootpassword") where User='root';

Tags:

Subscribe to RSS - ssh