MySQL Workbench: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
===Fix – MySQL ERROR 1819 (HY000): Your password does not satisfy the current policy requirements=== | ===Fix – MySQL ERROR 1819 (HY000): Your password does not satisfy the current policy requirements=== | ||
Create a database user with a weak password:<syntaxhighlight lang="shell"> | Create a database user with a weak password: | ||
<syntaxhighlight lang="shell"> | |||
sudo mysql -u root | sudo mysql -u root | ||
</syntaxhighlight><syntaxhighlight lang="shell"> | </syntaxhighlight> | ||
<syntaxhighlight lang="shell"> | |||
create user 'ostechnix'@'localhost' identified by 'mypassword'; | create user 'ostechnix'@'localhost' identified by 'mypassword'; | ||
</syntaxhighlight>Terdapat error seperti berikut<syntaxhighlight lang="shell"> | </syntaxhighlight> | ||
Terdapat error seperti berikut | |||
<syntaxhighlight lang="shell"> | |||
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements | ERROR 1819 (HY000): Your password does not satisfy the current policy requirements | ||
</syntaxhighlight>Pada saat menjalankan <syntaxhighlight lang="shell"> | </syntaxhighlight> | ||
Pada saat menjalankan | |||
<syntaxhighlight lang="shell"> | |||
sudo mysql_secure_installation utility | sudo mysql_secure_installation utility | ||
</syntaxhighlight>Memilih salah satu | </syntaxhighlight> | ||
Memilih salah satu | |||
*<code>LOW</code> Length >= 8 characters. | *<code>LOW</code> Length >= 8 characters. | ||
*<code>MEDIUM</code> Length >= 8, numeric, mixed case, and special characters. | *<code>MEDIUM</code> Length >= 8, numeric, mixed case, and special characters. | ||
*<code>STRONG</code> Length >= 8, numeric, mixed case, special characters and dictionary file. | *<code>STRONG</code> Length >= 8, numeric, mixed case, special characters and dictionary file. | ||
*Jika memilih MEDIUM buatlah password yang mengandung huruf aphabet kapital dan kecil lalu berikan tanda baca serta angka. Berikut adalah contoh perintahnya | |||
<syntaxhighlight lang="shell"> | <syntaxhighlight lang="shell"> | ||
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Qweewq*#123'; | ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Qweewq*#123'; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*Perintah berikut digunakan untuk mengubah password pada user root | *Perintah berikut digunakan untuk mengubah password pada user root | ||
*Jika ingin membuat user baru, berikut adalah perintahnya | *Jika ingin membuat user baru, berikut adalah perintahnya | ||
<syntaxhighlight lang="shell"> | <syntaxhighlight lang="shell"> | ||
create user 'ostechnix'@'localhost' identified by 'Qweewq*#123'; | create user 'ostechnix'@'localhost' identified by 'Qweewq*#123'; | ||
| Line 27: | Line 43: | ||
*[https://dev.to/gsudarshan/how-to-install-mysql-and-workbench-on-ubuntu-20-04-localhost-5828 dev.to] | *[https://dev.to/gsudarshan/how-to-install-mysql-and-workbench-on-ubuntu-20-04-localhost-5828 dev.to] | ||
*[https://stackoverflow.com/questions/17975120/access-denied-for-user-rootlocalhost-using-password-yes-no-privileges stackoverflow.com] | *[https://stackoverflow.com/questions/17975120/access-denied-for-user-rootlocalhost-using-password-yes-no-privileges stackoverflow.com] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
[[Category:Database]] | [[Category:Database]] | ||
{{DISPLAYTITLE:MySQL Workbench}} | {{DISPLAYTITLE:MySQL Workbench}} | ||