I'm using MySQL 5.7.25 and i want to increase my MySQL password policy by doing this in MySQL command:
SET GLOBAL validate_password_policy=2;
But i always get an error:
ERROR 1193 (HY000): Unknown system variable 'validate_password_policy'
I tried to list the validate_password variable:
SHOW VARIABLES LIKE 'validate_password%'
but it always return empty set
This problem has happened because validate_password plugin is by default NOT activated. You can solve by these commands:
mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like 'validate%';
Empty set (0.00 sec)
mysql> install plugin validate_password soname 'validate_password.so';
Query OK, 0 rows affected (0.02 sec)
mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like 'validate%';
Finally, you will show the following:
+-------------------+---------------+
| plugin_name | plugin_status |
+-------------------+---------------+
| validate_password | ACTIVE |
+-------------------+---------------+
1 row in set (0.00 sec)
Then you can run your command:
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| validate_password_check_user_name | OFF |
| 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 |
+--------------------------------------+--------+
7 rows in set (0.00 sec).
This command works for me. I'm using MySQL 8.
SET GLOBAL validate_password.policy=LOW;
SET GLOBAL validate_password_policy=LOW;
Replace validate_password(dot)policy with validate_password_policy
Related
Is it normal, that the MySQL global variable gtid_executed changes multiple times in a minute?
These MySQL commands were executed in a time range of 10 seconds:
mysql> show global variables like 'gtid_executed';
+---------------+-------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------+
| gtid_executed | d4eeed2f-6cc7-11e9-aa15-fa163e5318c7:1-26918205 |
+---------------+-------------------------------------------------+
1 row in set (0.00 sec)
mysql> show global variables like 'gtid_executed';
+---------------+-------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------+
| gtid_executed | d4eeed2f-6cc7-11e9-aa15-fa163e5318c7:1-26918206 |
+---------------+-------------------------------------------------+
1 row in set (0.00 sec)
mysql> show global variables like 'gtid_executed';
+---------------+-------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------+
| gtid_executed | d4eeed2f-6cc7-11e9-aa15-fa163e5318c7:1-26918207 |
+---------------+-------------------------------------------------+
1 row in set (0.00 sec)
Every time there is a different value! Is that normal?
It is a single node SaaS MySQL RDS instance in a cloud environment.
Thank you kindly in advance.
If you have activity on the server this is a normal behaviour, as for each new transaction a new GTID value is assigned to it incremented by one.
I'm getting the following error: https://gist.github.com/glaksmono/859e495d61bfb4c66e1bdb24dbdf5719
And here's what I have in my databases:
mysql> mysql> SHOW DATABASES;
+----------------------+
| Database |
+----------------------+
| information_schema |
| exchange_development |
| exchange_production |
| exchange_test |
| mysql |
| performance_schema |
| sys |
+----------------------+
7 rows in set (0.00 sec)
mysql> USE exchange_development;
Database changed
mysql> SHOW TABLES;
Empty set (0.00 sec)
mysql>
I've tried executing bundle exec rake db:schema:load prior, and been searching over the web on this but none has worked so far. Thoughts?
I use PhpStorm 2016.3.2 and I want to connect my MySQL database.
But, when I want to connect, I have a timeout exception.
I checked the connection hots/port :
mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0,00 sec)
mysql> show processlist;
+-----+------+-----------+------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+----------+------------------+
| 287 | root | localhost | NULL | Query | 0 | starting | show processlist |
+-----+------+-----------+------+---------+------+----------+------------------+
1 row in set (0,00 sec)
mysql>
I have download jdbc connector/j here and copy/past the mysql-connector-java-5.1.40-bin.jar file in /Library/Java/Extensions. I have add this file to my PhpStorm MySQL Driver :
My Database connection config :
I do not understand why he can not connect...
I am a newbie to SQL Server. In MySQL to find the count of the insert, update, delete, select queries we have the below queries:
SELECT
mysql> SHOW GLOBAL STATUS like '%com_select%';
+-------------+-----+
| Variable_name | Value |
+-------------+-----+
| Com_select | 1 |
+-------------+-----+
1 row in set (0.00 sec)
INSERT
mysql> SHOW GLOBAL STATUS like '%com_insert%';
+-----------------+-----+
| Variable_name | Value |
+-----------------+-----+
| Com_insert | 0 |
| Com_insert_select | 0 |
+-----------------+-----+
2 rows in set (0.00 sec)
UPDATE
mysql> SHOW GLOBAL STATUS like '%com_update%';
+----------------+-----+
| Variable_name | Value |
+----------------+-----+
| Com_update | 0 |
| Com_update_multi | 0 |
+----------------+-----+
2 rows in set (0.00 sec)
DELETE
mysql> SHOW GLOBAL STATUS like '%com_delete%';
+----------------+-----+
| Variable_name | Value |
+----------------+-----+
| Com_delete | 0 |
| Com_delete_multi | 0 |
+----------------+-----+
2 rows in set (0.00 sec)
Similarly are there any equivalent queries to find the count of the insert, update, delete, select queries in SQL Server?
Thanks !!!
Edit : A SQL server performance counter sys.dm_os_performance_counters provides the Page reads/sec & writes/sec like wise there anyother counters that can provide insert,update,delete counts?
I would like to know the difference between below two values in mysql.
show status like 'queries' ;
+---------------+-------------+
| Variable_name | Value |
+---------------+-------------+
| Queries | 16987383643 |
+---------------+-------------+
1 row in set (0.00 sec)
mysql> show status like 'Questions' ;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Questions | 5 |
+---------------+-------+
1 row in set (0.00 sec)
Try looking in the manual?
13.7.5.37. SHOW STATUS Syntax
5.1.5. Server Status Variables
unlike the Queries variable. This [Questions] variable does not count COM_PING, COM_STATISTICS, COM_STMT_PREPARE, COM_STMT_CLOSE, or COM_STMT_RESET commands.