
To do an install and do the initial setup of MySQL / MariaDB on Centos7+, run the following commands
# Install and start yum install mariadb-server systemctl start mariadb systemctl enable mariadb # Confirm DB is running systemctl status mariadb # Do initial setup and follow the prompts sudo mysql_secure_installation
Search the entire database for a particular string. Better to be done with a mysqldump inside Linux and use the resulting SQL file
mysqldump -p database --extended=FALSE | grep searchstring | less -S # Example mysqldump -p database --extended=FALSE | grep "find string" | less -S
Backup a database
mysqldump -p database > backupname.sql
Restore a database
mysql -u user -p database < filename.sql
Backup a specific table (table1 and table2)
mysqldump -u user -p database table1 table2 > filename.sql