Set Root Password in MySQL

Setelah instalasi MySQL secara default user root tidak memiliki password. Tentu hal ini sangat berbahaya untuk keamanan database karena setiap orang yang bisa mengakses server Anda akan bisa login sebagai admin (root) tanpa perlu memasukkan password.

Untuk mengecek security, buka http://localhost/security/index.php

xampp security

Xampp Security

Bisa dilihat bahwa admin user root tidak memiliki password. Untuk melakukan setting password, bisa dilakukan dengan beberapa cara:

Cara pertama dengan mengakses tab Security yang ada menu sebelah kiri atau langsung ketik halaman ini http://localhost/security/xamppsecurity.php kemudian masukkan pasword root yang diinginkan

Xampp Security Tab

Xampp Security Tab

 

Set Password

Set Password

Atau menggunakan cara yang lain yaitu dengan masuk halaman phpMyAdmin http://localhost/phpmyadmin/ kemudian pilih Privileges. Cari user root kemudian klik Edit Privileges. Selanjutnya akan muncul popup untuk mengedit privilege user root. Scroll dan cari bagian Change Password dan isikan password root yang diinginkan

privilege

privilege

 

set password

set password

Mudah kan?
Semoga bermanfaat 🙂After MySQL installation, by default root user doesn’t have password. Of course this can be dangerous for your database security because anyone who can access your server can logged in into MySQL as admin (root) without entering password.

To check your security status, open http://localhost/security/index.php

xampp security

Xampp Security

As you can see, the admin user root doesn’t have password. There are several ways to set the password:

First is access Security tab on the left side menu at your xampp page or go directly to this address http://localhost/security/xamppsecurity.php and then insert your desired password.

Xampp Security Tab

Xampp Security Tab

Set Password

Set Password

Or you can try another way, go into phpMyAdmin page http://localhost/phpmyadmin/ and click Privileges menu. Find root user and click Edit Privilege. There will be pop up to edit your user privilege. Scroll and find Change Password section and insert your desired password.

privilege

privilege

set password

set password

Easy, isn’t it?
Hope it will be helpful 🙂

Tagged: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.