Please Wait, Loading...

Saturday 3 September 2016

Serba serbi Mengenai MySQL

  1. Show versi, daftar process, thread
    SHOW VARIABLES LIKE "%version%"; 
    SHOW FULL PROCESSLIST;
    SHOW PROCESSLIST;
    SHOW STATUS LIKE 'Thread%';
  2. Solusi ketika membuat user keluar pesan kesalahan "ERROR 1054 (42S22): Unknown column 'password_last_changed' in 'mysql.user' "
     mysql_upgrade -u root -p
    /etc/init.d/mysqld restart
    Lakukan drop user, flush privileges, kemudian lakukan pembuatan user dan tentukan grant dan flush privileges nya.
  3. Cek dan Un-Install password authentication plug-in di MySQL
    mysql> select * from information_schema.plugins where plugin_name='validate_password';
    Empty set (0.05 sec)


    mysql> show variables like 'validate_password%';
    Empty set (0.00 sec)
     install plugin validate_password soname 'validate_password.dll';
    Query OK, 0 rows affected (0.00 sec)
    Verifikasi jika plug in telah terinstall :
     select * from information_schema.plugins where plugin_name='validate_password'\G
    Menampilkan plug in terhadap variabel-variabel :
    show variables like 'validate_password%';
    +--------------------------------------+--------+
    | Variable_name                                     | Value  |
    +--------------------------------------+--------+
    | validate_password_dictionary_file         |        |
    | validate_password_length                     | 5      |
    | validate_password_mixed_case_count   | 1      |
    | validate_password_number_count       | 1      |
    | validate_password_policy                    | MEDIUM |
    | validate_password_special_char_count | 1      |
    +--------------------------------------+--------+
    Kustomisasi mengenai nilai :
    # SET GLOBAL validate_password_length = 5;
    # SET GLOBAL validate_password_number_count = 0;
    # SET GLOBAL validate_password_mixed_case_count = 0;
    # SET GLOBAL validate_password_special_char_count = 0;
     Uninstall plugin :
    mysql> uninstall plugin validate_password;
    Query OK, 0 rows affected (0.02 sec)
    mysql> select * from information_schema.plugins where plugin_name='validate_password'\G
    Empty set (0.01 sec)

    mysql> show variables like 'validate_password%';
    Empty set (0.00 sec)
  4.  
    Demikain, Semoga bermanfaat