![]() ![]() You’ll need an Ubuntu server to run MySQL/MariaDB on.Choose one and install it for your LAMP stack, we’ll include instructions for both. We recommend Vultr, they offer a $2.5 per month instance which is more than enough for a simple LAMP stack. You can compare other cloud server providers too. You’ll need the root user or a user with sudo access to the server.The commands below are all executed by a root user, so we didn’t have to append ‘sudo’ to each command. You’ll likely have to if you use a non-root user.You’ll need SSH enabled if you use Ubuntu or an SSH client like MobaXterm if you use Windows.MySQL/MariaDB may already be installed on your server.You can check if they’re installed by entering “mysql” or “mariadb” and you should know based on the output. Then, install MySQL by running the following command: apt-get install mysql-server Update Ubuntuįirst of all, as always, before you do anything else, update your Ubuntu server by running the following command: apt-get update & apt-get upgrade Install MySQL If you want to install MariaDB, skip to the MariaDB instructions. This command will install both the MySQL server and client. You’ll get a prompt to enter a password for your root user. ![]() Now, you need to secure and configure it. You should run the mysql_secure_installation script that will help you secure your MySQL. Start the script with the following command: mysql_secure_installationĪnd respond to the prompts. You can respond with the default to each prompt. To optimize your MySQL, you can use the MySQLTuner script. The script will only give you recommendations on how you can improve and optimize your MySQL.ĭownload and run the script with the following command: curl -L | perlĪnd check the recommendations. Do some research and use google for each recommendation. If you don’t know what you’re doing, contact someone else and let them do it for you or just skip this. You can repair all your databases with a single command: mysqlcheck -A -auto-repair -u root -p You can also use mysqlcheck to repair your databases. ![]() There are other optimizations you can do on your server and databases, so do your own research if you want to further optimize MySQL. Now for our MariaDB installation instructions. Update Ubuntuįirst, update your Ubuntu server: apt-get update & apt-get upgrade Add the MariaDB repositoryīefore you can install MariaDB, you need to add the MariaDB repository.ĭepending on your Ubuntu release, you may need to run different commands, so go to the official MariaDB repository page, select your distro and choose a mirror closest to your server’s location. Then, copy the commands you’ll get on the page. We use Ubuntu 20.04 and we chose a random mirror, so we’ll run these commands to add the repository: sudo apt-get install software-properties-common dirmngr apt-transport-https Sudo add-apt-repository 'deb focal main'Īgain, this command will be different depending on the distro you’re using and the version of MariaDB you want to install. Next, you need to update your package list again: apt-get updateĪnd move onto installing MariaDB. ![]() Install MariaDBĪfter you’ve added the MariaDB repository, you can install it by running the following command: apt-get install mariadb-serverĪnd that’s it. Run the security script with the following command: mysql_secure_installationĪnd follow the prompts. You can enter the default for each prompt. Optimize MariaDB (advanced users only)Īgain, same with MySQL, you can use MySQLTuner to check your MariaDB and get recommendations on how to improve it. MARIADB PHPMYADMIN UBUNTU 20.04 UPGRADE.MARIADB PHPMYADMIN UBUNTU 20.04 INSTALL. ![]()
0 Comments
Leave a Reply. |