IPv6 Database: MySQL Server

From OnnoWiki
Revision as of 09:04, 23 September 2018 by Onnowpurbo (talk | contribs) (Created page with "Instalasi dengan menggunakan perintah # apt-get update # apt-get -y install mysql-server mysql-client Agar lebih aman lakukan secure installation # mysql_secure_installa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Instalasi dengan menggunakan perintah

# apt-get update
# apt-get -y install mysql-server mysql-client

Agar lebih aman lakukan secure installation

# mysql_secure_installation

Jawab “Y” untuk banyak pertanyaan berikut

 Enter current password for root (enter for none): 
 OK, successfully used password, moving on...
 Change the root password? [Y/n] n
  ... skipping.
 Remove anonymous users? [Y/n] 
  ... Success!
 Disallow root login remotely? [Y/n] Y
  ... Success!
 Remove test database and access to it? [Y/n] Y
  ... Success!
 Reload privilege tables now? [Y/n] Y
  ... Success!

Edit Konfigurasi MySQL agar bisa di sambung dari IPv4 dan IPv6

vi /etc/mysql/my.cnf

Pastikan

bind-address            = ::

Restart MySQL Server

/etc/init.d/mysql restart

Test sambungan MySQL ke localhost (::1) dengan IPv6

mysql -u root -h ::1 -p123456 

Jika berhasil maka akan keluar kira-kira:

Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 37 
Server version: 5.5.35-1ubuntu1 (Ubuntu) 

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 

Oracle is a registered trademark of Oracle Corporation and/or its 
affiliates. Other names may be trademarks of their respective 
owners. 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 

mysql> 

Coba Ketik

mysql> show databases;

Akan keluar kira-kira:

+--------------------+ 
| Database           | 
+--------------------+ 
| information_schema | 
| mysql              | 
| performance_schema | 
+--------------------+ 
3 rows in set (0.00 sec) 


Pranala Menarik