Blog Spot!


Install and configure MySQL 8 on Ubuntu like sytems

  • How To Install MySQL on Ubuntu 20.04 link

1.

  • sudo apt update
  • sudo apt install mysql-server
  • sudo mysql_secure_installation
  1. Login as root

In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the auth_socket plugin by default rather than with a password. This plugin requires that the name of the operating system user that invokes the MySQL client matches the name of the MySQL user specified in the command, so you must invoke mysql with sudo privileges to gain access to the root MySQL user:

sudo mysql

  1. Create a user link good explanation.

Note: There is a known issue with some versions of PHP that causes problems with caching_sha2_password. If you plan to use this database with a PHP application — phpMyAdmin, for example — you may want to create a user that will authenticate with the older, though still secure, mysql_native_password plugin instead:

CREATE USER 'sammy'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
ALTER USER 'sammy'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Bonus - Create a ROOT like user wilt all the POWER!

GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;

Added on 12.Mar.2021
Tags: mysql linux terminal install ubuntu database

How to do a live system backup in a single file

tl;dr

gzip

sudo tar czfv /backup.tar.gz --exclude=/backup.tar.gz --exclude=/dev --exclude=/mnt --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/run --exclude=/lost+found /

It will create an archive of all your files at /backup.tar.gz, which you can then copy over to another computer/drive and restore your files

mksquashfs - tldp

sudo mksquashfs / /backup.sqsh -e /backup.sqsh /media /dev /mnt /proc /sys /tmp /run /lost+found

"-e" switch excludes folders you want to exclude

Added on 12.Mar.2021
Tags: backup linux terminal gzip mksquashfs

Linux - wget - download all files of type X in current directory without going UP or DOWN the tree.

gnu wget

Examples:

  1. Download all .md5 files in current directory without going UP or DOWN the tree.
wget -r -np -nd -l1 -A "*.md5" https://mxlinux.ipacct.com/MX-Linux/ANTIX/Final/antiX-19/ -P ./mx

‘-r’, ‘--recursive’

Specify recursive download

‘-np’, ‘--no-parent’

Do not ever ascend to the parent directory when retrieving recursively. This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded. See Directory-Based Limits, for more details.

‘-nd’, ‘--no-directories’

Do not create a hierarchy of directories when retrieving recursively. With this option turned on, all files will get saved to the current directory, without clobbering (if a name shows up more than once, the filenames will get extensions ‘.n’).

‘-l depth’, ‘--level=depth’

Set the maximum number of subdirectories that Wget will recurse into to depth. In order to prevent one from accidentally downloading very large websites when using recursion this is limited to a depth of 5 by default, i.e., it will traverse at most 5 directories deep starting from the provided URL. Set ‘-l 0’ or ‘-l inf’ for infinite recursion depth.

‘-A acclist’, ‘--accept acclist’
‘-R rejlist’, ‘--reject rejlist’

Specify comma-separated lists of file name suffixes or patterns to accept or reject (see Types of Files). Note that if any of the wildcard characters, ‘*’, ‘?’, ‘[’ or ‘]’, appear in an element of acclist or rejlist, it will be treated as a pattern, rather than a suffix. In this case, you have to enclose the pattern into quotes to prevent your shell from expanding it, like in ‘-A "*.mp3"’ or ‘-A '*.mp3'’.

‘-P prefix’, ‘--directory-prefix=prefix’

Set directory prefix to prefix. The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the top of the retrieval tree. The default is ‘.’ (the current directory).

Added on 06.Mar.2021
Tags: linux wget terminal download

Omit & Pick functionality for JavaScript

ES5-ES6-ES2017-ES2019 omit & pick

gist

Added on 15.Feb.2021
Tags: js pick omit filter whitelist blacklist

Extending the life of your Raspberry PI SD Card

Added on 01.Feb.2021
Tags: articles sd card raspberry io linux

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top