GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Come installare MariaDB su Ubuntu 14.04

In questo tutorial, ti mostreremo come installare MariaDB su Ubuntu 14.04. Per chi non lo sapesse, MariaDB è un sostituto drop-in di MySQL. È facile install, offre molti miglioramenti in termini di velocità e prestazioni ed è facile da integrare nella maggior parte delle implementazioni MySQL. MariaDB è ampiamente utilizzato e diverse distribuzioni Linux e grandi aziende sono già passate da MySQL a MariaDB.

Questo articolo presuppone che tu abbia almeno una conoscenza di base di Linux, sappia come usare la shell e, soprattutto, che ospiti il ​​tuo sito sul tuo VPS. L'installazione è abbastanza semplice e presuppone che tu sono in esecuzione nell'account root, in caso contrario potrebbe essere necessario aggiungere 'sudo ' ai comandi per ottenere i privilegi di root. L'installazione è abbastanza semplice. Ti mostrerò l'installazione passo passo di MariaDB su Ubuntu 14.04.

Prerequisiti

  • Un server che esegue uno dei seguenti sistemi operativi:Ubuntu 14.04.
  • Si consiglia di utilizzare una nuova installazione del sistema operativo per prevenire potenziali problemi.
  • Accesso SSH al server (o semplicemente apri Terminal se sei su un desktop).
  • Un non-root sudo user o accedere all'root user . Ti consigliamo di agire come non-root sudo user , tuttavia, poiché puoi danneggiare il tuo sistema se non stai attento quando agisci come root.

Installa MariaDB su Ubuntu 14.04

Passaggio 1. La prima necessità è abilitare il repository MariaDB.

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

Passaggio 2. Installazione di MariaDB.

Una volta importata la chiave e aggiunto il repository, puoi installare MariaDB con:

apt-get update
apt-get install mariadb-server

Al momento dell'installazione, MariaDB chiedeva la password dell'utente root. Inserisci la password e assicurati di non dimenticarla.

Passaggio 3. Proteggi MariaDB dopo l'installazione.

Per impostazione predefinita, MariaDB non è protetto. Puoi proteggere MariaDB usando lo script mysql_secure_installation. dovresti leggere attentamente e sotto ogni passaggio che imposterà una password di root, rimuovere anonimo utenti, non consentire l'accesso root remoto e rimuovere il database di test e l'accesso per proteggere MariaDB.

# 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]#

Passaggio 4. Avvia il servizio MariaDB.

service mysql start

Passaggio 5. Accedi a MariaDB.

Dopo aver completato l'installazione puoi connetterti a MariaDB usando il seguente comando.

mysql -u root -p

Congratulazioni! Hai installato correttamente MariaDB. Grazie per aver utilizzato questo tutorial per l'installazione del sistema di gestione del database MariaDB su Ubuntu 14.04. Per ulteriore aiuto o informazioni utili, ti consigliamo di controllare il sito Web ufficiale di MariaDB .


Ubuntu
  1. Come installare MariaDB 10.4 su Ubuntu 18.04

  2. Come installare MariaDB su Ubuntu 18.04

  3. Come installare MariaDB su Ubuntu 20.04

  4. Come installare MariaDB in Ubuntu 20.04 LTS

  5. Come installare MariaDB su Ubuntu 16.04

Come installare Pixie su Ubuntu 15.04

Come installare MariaDB su Ubuntu 16.04

Come installare CachetHQ su Ubuntu 16.04 LTS

Come installare Seafile su Ubuntu 16.04 LTS

Come installare MariaDB su Ubuntu 18.04 LTS

Come installare MariaDB su Ubuntu