Saturday, March 21, 2015

d. Test password validation. mysql


New optimization row copied - MySQL5.6 provides a new option variable binlog-row-image = minimal, which allows the application to copy only changed in the DML operations data elements. This improves the master / slave replication server ends of throughput and minimize disk space binary logs, network and server resources required memory space. A new fail-safe protection from the server (Crash-Save) - MySQL 5.6 binary log data will be stored internally in the data table so that the server can automatically roll back (roll back) the transaction is copied to the last event before failure does not require administrator intervention can continue to replicate. This not only reduces the burden on the operator, but also eliminates the risk of damage from the server tries to recover data caused by data loss. In addition, if the primary server failure resulted in damage kies to the binary log file, the server will automatically revert to a position information can be read correctly.
New time delay (Time-delayed) copy - MySQL 5.6 allows kies developers to set a time delay on the replication stream to prevent operational errors on the main server is transmitted to the server. With the time delay from the master configuration, in the event of failure or to restore the database to the state before kies the server can be promoted to become the new primary server. It also allows data library before the error occurred or the power interruption is detected, thereby protecting the safety kies database to avoid the need for data recovery. Enhance the effectiveness of the Platform (Performance Schema).
. i WEAK: just check the password length. . ii MEDIUM: kies Check the case and special symbols. iii STRONG:. to check whether there is a password in the password dictionary file.
c. Check the environment variables. mysql> show variables like 'validate_password%'; kies + -------------------------------------- + -------- + | Variable_name kies | Value | + ----------------------------------- --- + -------- + | validate_password_dictionary_file | | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | MEDIUM | | validate_password_special_char_count | 1 | + ------- ------------------------------- + -------- + 6 rows in set (0.00 sec)
d. Test password validation. mysql> set password for 'stanley' @ '% s' = password ('test'); ERROR 1819 (HY000): Your password does not satisfy the current policy requirements mysql> set password for 'stanley' @ '%' = password ('Stanley 1234!'); Query OK, 0 rows affected (0.00 sec)
Official documents recommend, password function applies only for internal use MySQL database, instead of using MySQL password encryption method in the application to store passwords, because I would have safety concerns. kies Because the password can clearly be sha1 and unhex two functions to components. mysql> select user, host, password from mysql.user where user = 'stanley' and host = '%'; + --------- + ------ + ------- ------------------------------------ + | user | host | password | + ----- ---- + ------ + -------------------------------------- ----- + | stanley |% | * 76274CDEF97EB4B8B3B5E156F65C09379CF28D63 | + --------- + ------ + ------------------ ------------------------- + 1 row in set (0.00 sec) mysql> select concat ("*", sha1 (unhex (sha1 (" ! Stanley 1234 ")))); + ---------------------------------------- -------- kies + | concat ("*", sha1 (unhex (sha1 ("Stanley 1234!")))) | + ----------------- ------------------------------- + | * 76274cdef97eb4b8b3b5e156f65c09379cf28d63 | + ------------- ----------------------------------- + 1 row in set (0.00 sec) 9. Other important upgrade.
The new GET DIAGNOSTICS command provides an interface standard diagnostic areas, can easily be made and the results processed through the CLI or from the application code, for example: mysql> DROP TABLE test.my_table; ERROR 1051 (42S02): Unknown table 'test.my_table' mysql> GET DIAGNOSTICS CONDITION 1 -> @ p1 = RETURNED_SQLSTATE, @ p2 = MESSAGE_TEXT; mysql> SELECT @ p1, @ p2; + ------- + --------- ---------------------- + | @ p1 | @ p2 | + ------- + ----------- -------------------- + | 42S02 | Unknown table 'test.my_table' | + ------- + --------- ---------------------- +
Please login message. No account registration can also use Facebook, Google+ Log Message


No comments:

Post a Comment