Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Thursday, September 26, 2013

Membuka akses untuk host mengakses database server di MySQL

Default awal GRANT yang diberikan adalah 'root'@'localhost'

Kalau saya mau mengakses dari komputer lain ke database server, hal tersebut tidak diperbolehkan karena host tersebut bukan localhost. Maka dari itu saya harus set di MySQL.

> use mysql;
> grant all privileges on *.* to root@'%' identified by 'oklah';
> flush privileges;

Set password ROOT pada MySQL

Default dari MySQL tidak ada password untuk root. Untuk set password untuk root di MySQL adalah:

(misalnya password: oklah)

mysqladmin -u root password oklah