mysql new user access denied

Ini pengalaman bodoh sih,
gegara harus jadi superman jadi sysadmin juga. Biasa ga pernah maenin user previlledge di mysql.
waktu add users, tiba2 si users gbsa akses db yang bersangkutan ada error begini Access denied for user ‘abc’@’localhost’ (using password: YES).

jadi ini catetan doang mengenai flush, udah langsung aja karena sering lupa.

dari terminal connect ke mysql administrator:

mysql -u root -p mysql
Pas udah masuk, jalanin perintah ini *sesuain sama user yg dbikn dan db nya:

> grant all privileges on DATABASE_NAME.* to USERNAME@localhost identified by ‘PASSWORD’;
> flush privileges;
> \q

info lebih lanjut ada disini http://dev.mysql.com/doc/refman/5.1/en/grant.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s