Search found 962 matches
- Tue Jun 28, 2022 2:53 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Export User Grants/Revokes
Export User Grants/Revokes The Percona Toolkit comes with a handy utility called pt-show-grants which will allow you to export an SQL file of all the grants for all your databases into a single file that you can use to audit permissions or help with a restore or help with database migrations. This ...
- Tue Jun 28, 2022 2:53 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Graphical User Interfaces
NOTE: I have not tested most of these since I tend to use the command-line. However, Adminer is enjoying frequent updates and is a single php file. Web-based interfaces There are a few web-based tools you can get for a GUI front-end to MariaDB. It is not recommended to install a web server on your ...
- Tue Jun 28, 2022 2:52 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Additional Security Measures
Rename root For increased security, you can rename the root account to something else with the following commands: USE mysql; UPDATE USER SET User='NewSecretRoot' WHERE User='root'; FLUSH PRIVILEGES; Review User Accounts SELECT User,Host,Password FROM mysql.user; Make sure everyone has a password s...
- Tue Jun 28, 2022 2:52 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Fail2Ban
Fail2Ban If you have Fail2Ban installed and protecting SSH as part of the base install. You can add these few changes to also watch for database login failures. vi /etc/fail2ban/jail.local Add the following to the bottom. If your data path is different, be sure to update "logpath" [DEFAUL...
- Tue Jun 28, 2022 2:52 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Crontab Schedule
Crontab Schedule I would not advise anyone to ever "edit" a live crontab schedule by typing "crontab -e" but rather edit a saved schedule file and then load the schedule file. This will allow you to make backups of the schedule so you can always go back to a known-good schedule ...
- Tue Jun 28, 2022 2:51 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Migration
Migrate Database from Old Server You can use the full backup automatically made by the "db-backup.sh" script (/bak/mysql/db-all.sql) if you have that already running or you can create a manual backup. The steps below will document how to do it manually but you could just as easily use you...
- Tue Jun 28, 2022 2:51 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Backup On Demand
Database Backup On Demand This script is designed to run every minute looking for key files. If a specific file shows up on the share folder, it will trigger an immediate backup of the specified database. This is helpful when scheduling the backup of an app server and coordinating the backup of the...
- Tue Jun 28, 2022 2:50 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Decrypt Restore Script
This script will let you pick an encrypted archive to be decrypted and extracted to the temp folder. Once extracted, you can manually restore the database(s)/table(s) however you see fit. Create the script: sudo touch /var/scripts/prod/db-decrypt.sh sudo chown root:root /var/scripts/prod/db-decrypt....
- Tue Jun 28, 2022 2:49 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Backup All Databases
Database Backup Script This script is designed to perform a full backup of all databases while the server is online. It actually does several tasks which you can tailor to your needs: Extracts the system database, compresses it into a single archive and encrypts it. Extracts all user databases into...
- Tue Jun 28, 2022 2:49 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Scripting
Scripting Much of the solutions beyond this point involve scripts (programming snippets / automated commands). In particular, they are Bash Scripts. I chose this due to its popularity and the fact it comes with Ubuntu. I try to make use of what comes with the system without requiring additional sof...
- Tue Jun 28, 2022 2:34 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Usage Examples
Usage Examples Connect to the server using PuTTY. At the login prompt, login with your administrator account. Start a database session and create a database called wordpress and a user called u_wordpress with a password of " mydbpass " and grant the user access to the database: mysql -u r...
- Tue Jun 28, 2022 2:33 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Reset lost root password
Reset lost root password If you ever find yourself in the position of not being able to login (locally) to your database with your root account, you will need to reset the password. For example, phpmyadmin fails to change the password correctly and neither the old nor the new password works. This p...
- Tue Jun 28, 2022 2:22 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Relocate the Databases
Relocate the Databases If you do not want to leave your databases in the default location (/var/lib/mysql), then you can follow these steps to move them somewhere else. In this example, we will move them to /opt/mysql At the login prompt, login with your administrator account At the console, type t...
- Tue Jun 28, 2022 2:21 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Firewall Rules
Firewall Rules Edit the firewall script that was created during the initial setup of the server (if you followed my instructions ): sudo vi /var/scripts/prod/en-firewall.sh Add the following rule which allows connectivity from from anything on your local subnet: echo "Adding Database Server ru...
- Tue Jun 28, 2022 2:10 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Tighten Security
Secure Installation MariaDB comes with a script to tighten-down security for a production server. Perform these steps on the database server. Connect to the server using PuTTY. Start the secure install script: sudo mysql_secure_installation Enter current password for root: Just press ENTER here sin...
- Tue Jun 28, 2022 2:06 pm
- Forum: Tutorials
- Topic: How to Install MariaDB 10.6 (stable) on Ubuntu Server 22.04 LTS
- Replies: 17
- Views: 143
Install MariaDB
Install MariaDB Perform these steps on each database server. Install the database server and required dependencies by typing the following: sudo apt -y install mariadb-server When installation is completed, the database service should automatically start. It is also configured to automatically star...
- Mon Jun 20, 2022 10:02 am
- Forum: Tutorials
- Topic: How to Install Ark: Survival Evolved on Ubuntu Server 22.04 LTS
- Replies: 21
- Views: 329
Crontab Schedule
Crontab Schedule We will be utilizing the crontab schedule of the root user. The scripts that need to run as the low-rights user (like Steam updates) will be automatically switched inside the script so there should not be any issue running these scripts with the higher privilege level. viewtopic.ph...
- Mon Jun 20, 2022 10:02 am
- Forum: Tutorials
- Topic: How to Install Ark: Survival Evolved on Ubuntu Server 22.04 LTS
- Replies: 21
- Views: 329
Scripting - Menu
Scripting - Menu This is the main script that will call most of the other scripts and view their log files. You can download the script straight from my github using the below commands or manually create the file yourself by copying the code from this forum (which may get outdated compared to githu...
- Mon Jun 20, 2022 10:01 am
- Forum: Tutorials
- Topic: How to Install Ark: Survival Evolved on Ubuntu Server 22.04 LTS
- Replies: 21
- Views: 329
Scripting - Restore
Scripting - Restore This script will walk you through restoring an instance from a prior backup archive. You can download the script straight from my github using the below commands or manually create the file yourself by copying the code from this forum (which may get outdated compared to github) ...
- Mon Jun 20, 2022 10:01 am
- Forum: Tutorials
- Topic: How to Install Ark: Survival Evolved on Ubuntu Server 22.04 LTS
- Replies: 21
- Views: 329
Scripting - Backup
Scripting - Backup This script will backup all valid instances, configurations, logs and scripts to date-stamped archives. You can download the script straight from my github using the below commands or manually create the file yourself by copying the code from this forum (which may get outdated co...