MySQL

MySQL is a fast, multi-threaded, multi-user, and robust SQL database server. It is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.

Instalasi

Untuk menginstal MySQL, jalankan perintah berikut dari terminal prompt:

sudo apt-get install mysql-server mysql-client

Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:

sudo netstat -tap | grep mysql

Ketika Anda menjalankan perintah ini, Anda akan melihat baris berikut atau yang agak mirip:

tcp        0      0 localhost.localdomain:mysql           *:* LISTEN -

Jika server tidak berjalan dengan benar, Anda dapat mengetik perintah berikut untuk menjalankannya:

sudo /etc/init.d/mysql restart

Konfigurasi

By default, the administrator password is not set. Once you install MySQL, the first thing you must do is to configure the MySQL administrator password. To do this, run the following commands:

sudo mysqladmin -u root password katasandibarurootsql

sudo mysqladmin -p -u root -h localhost password newrootsqlpassword

Anda dapat menyunting berkas /etc/mysql/my.cnf untuk mengkonfigurasi setting dasar -- berkas log, nomor port, dll. Silakan lihat berkas /etc/mysql/my.cnf untuk info lebih lanjut.