MySQL command for import an SQL file into a MySQL database

Open a terminal window on your Linux system. Log in to MySQL using the following command. You will need to provide the MySQL root or a user with appropriate permissions and the password when prompted. mysql -u your_username -p Replace your_username with your MySQL username. Once you’re logged in, you can select the database where you want to import the SQL file. For example: USE your_database; Replace your_database with the name of the database you want to use....

October 15, 2023 · 1 min · 153 words · Saman Wijesinghe

Frequently use nano keyboard shortcuts

Opening a File: nano filename: Open a file for editing. Basic Navigation: Arrow keys: Move the cursor. Ctrl + B: Move one page up. Ctrl + F: Move one page down. Ctrl + A: Move to the beginning of the current line. Ctrl + E: Move to the end of the current line. Ctrl + Y: Scroll up one line. Ctrl + V: Scroll down one line. Editing Text: Ctrl + Space: Set a mark....

October 10, 2023 · 2 min · 310 words · Saman Wijesinghe

Convert into .webp

Installing cwebp sudo apt update sudo apt install webp Fedora cwebp sudo dnf install libwebp-tools Open Suse sudo zypper install libwebp-tools Arch u sudo pacman -S base-devel git clone https://aur.archlinux.org/libwebp.git cd libwebp makepkg -si Convert JPG and PNG to WEBP for file in *.jpg *.png; do cwebp "$file" -o "${file%.*}.webp" done

October 8, 2023 · 1 min · 51 words · Saman