GNU/Linux >> Tutoriels Linux >  >> Ubuntu

Comment installer MariaDB sur Ubuntu 14.04

Dans ce didacticiel, nous allons vous montrer comment installer MariaDB sur Ubuntu 14.04. Pour ceux d'entre vous qui ne le savaient pas, MariaDB remplace MySQL. Il est facile de install, offre de nombreuses améliorations de vitesse et de performances, et est facile à intégrer dans la plupart des déploiements MySQL. MariaDB est largement utilisé et plusieurs distributions Linux et grandes entreprises sont déjà passées de MySQL à MariaDB.

Cet article suppose que vous avez au moins des connaissances de base sur Linux, que vous savez utiliser le shell et, plus important encore, que vous hébergez votre site sur votre propre VPS. L'installation est assez simple et suppose que vous s'exécutent dans le compte root, sinon vous devrez peut-être ajouter 'sudo ‘ aux commandes pour obtenir les privilèges root. L'installation est assez simple. Je vais vous montrer l'installation pas à pas de MariaDB sur Ubuntu 14.04.

Prérequis

  • Un serveur exécutant l'un des systèmes d'exploitation suivants :Ubuntu 14.04.
  • Il est recommandé d'utiliser une nouvelle installation du système d'exploitation pour éviter tout problème potentiel.
  • Accès SSH au serveur (ou ouvrez simplement Terminal si vous êtes sur un ordinateur).
  • Un non-root sudo user ou l'accès à l'root user . Nous vous recommandons d'agir en tant qu'non-root sudo user , cependant, car vous pouvez endommager votre système si vous ne faites pas attention lorsque vous agissez en tant que root.

Installer MariaDB sur Ubuntu 14.04

Étape 1. Le premier besoin est d'activer le référentiel MariaDB.

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

Étape 2. Installation de MariaDB.

Une fois la clé importée et le référentiel ajouté, vous pouvez installer MariaDB avec :

apt-get update
apt-get install mariadb-server

Au moment de l'installation, MariaDB demanderait le mot de passe de l'utilisateur root. Entrez le mot de passe et assurez-vous de ne pas l'oublier.

Étape 3. Sécurisez MariaDB après l'installation.

Par défaut, MariaDB n'est pas renforcée. Vous pouvez sécuriser MariaDB à l'aide du script mysql_secure_installation. vous devez lire attentivement et en dessous de chaque étape qui définira un mot de passe root, supprimera anonyme utilisateurs, interdire la connexion root à distance et supprimer la base de données de test et l'accès à MariaDB sécurisé.

# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@idroot]#

Étape 4. Démarrez le service MariaDB.

service mysql start

Étape 5. Connectez-vous à MariaDB.

Une fois l'installation terminée, vous pouvez vous connecter à MariaDB à l'aide de la commande suivante.

mysql -u root -p

Félicitations ! Vous avez installé MariaDB avec succès. Merci d'avoir utilisé ce didacticiel pour installer le système de gestion de base de données MariaDB sur Ubuntu 14.04. Pour obtenir de l'aide supplémentaire ou des informations utiles, nous vous recommandons de consulter le site Web officiel de MariaDB .


Ubuntu
  1. Comment installer MariaDB 10.4 sur Ubuntu 18.04

  2. Comment installer MariaDB sur Ubuntu 18.04

  3. Comment installer MariaDB sur Ubuntu 20.04

  4. Comment installer MariaDB dans Ubuntu 20.04 LTS

  5. Comment installer MariaDB sur Ubuntu 16.04

Comment installer Pixie sur Ubuntu 15.04

Comment installer MariaDB sur Ubuntu 16.04

Comment installer CachetHQ sur Ubuntu 16.04 LTS

Comment installer Seafile sur Ubuntu 16.04 LTS

Comment installer MariaDB sur Ubuntu 18.04 LTS

Comment installer MariaDB sur Ubuntu