I know this is really late, but you really need to capture the output of SHOW ENGINE INNODB STATUS; during that query to see why it's waiting.
If it happens a lot during a specific time, it would be easy to just grab that output every x seconds and hope you capture it (or perhaps artificially generate the load).
Based on your old_passwords
setting, I would ask you to look at three things
- What password functions return
- What passwords are stored in
mysql.user
- What authentication style is the client launching
PASSWORD FUNCTIONS
Please run the following:
show variables like 'old_passwords';
select password('rolando'),old_password('rolando');
Depending on where old_passwords
is enabled or not, you should get either the following:
MySQL 5.0 with old_passwords
off
mysql> show variables like 'old_passwords';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| old_passwords | OFF |
+---------------+-------+
1 row in set (0.00 sec)
mysql> select password('rolando'),old_password('rolando');
+-------------------------------------------+-------------------------+
| password('rolando') | old_password('rolando') |
+-------------------------------------------+-------------------------+
| *C1868CE781FCB521A03168DE044BF3F64E9E485A | 05e97e95241a4409 |
+-------------------------------------------+-------------------------+
1 row in set (0.00 sec)
mysql>
MySQL 5.1 with old_passwords
on
mysql> show variables like 'old_passwords';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| old_passwords | ON |
+---------------+-------+
1 row in set (0.00 sec)
mysql> select password('rolando'),old_password('rolando');
+---------------------+-------------------------+
| password('rolando') | old_password('rolando') |
+---------------------+-------------------------+
| 05e97e95241a4409 | 05e97e95241a4409 |
+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql>
MySQL 5.5 with old_passwords
off
mysql> show variables like 'old_passwords';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| old_passwords | OFF |
+---------------+-------+
1 row in set (0.00 sec)
mysql> select password('rolando'),old_password('rolando');
+-------------------------------------------+-------------------------+
| password('rolando') | old_password('rolando') |
+-------------------------------------------+-------------------------+
| *C1868CE781FCB521A03168DE044BF3F64E9E485A | 05e97e95241a4409 |
+-------------------------------------------+-------------------------+
1 row in set (0.00 sec)
mysql>
MySQL 5.5 with old_passwords
on
mysql> show variables like 'old_passwords';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| old_passwords | ON |
+---------------+-------+
1 row in set (0.00 sec)
mysql> select password('rolando'),old_password('rolando');
+---------------------+-------------------------+
| password('rolando') | old_password('rolando') |
+---------------------+-------------------------+
| 05e97e95241a4409 | 05e97e95241a4409 |
+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql>
PASSWORDS STORED
Please run this query:
SELECT COUNT(1) password_length_count,password_length FROM
(SELECT LENGTH(password) password_length FROM mysql.user) A
GROUP BY password_length;
If you get any password_length
of 16, you have to enable old_passwords
for the old style authentication to work.
PASSWORDS FROM CLIENT
In some cases, using mysql libraries that came from old yum installs of MySQL, PHP, Perl or Apache may have pre-MySQL4.1 user authentication code. Please upgrade such libraries.
Best Answer
node.js needs something like this to start with:
Yeah,
ασδασδ
looks Greek to me. What you have is "Mojibake". See https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored for discussion of what causes Mojibake.Do not use any form of encode/decode/conv -- it only compounds the problem. If that link does not help you, provide the extra details that it requests.
See also https://www.npmjs.com/package/utf8
The form should mention utf-8:
Analysis...
'Κ' (Greek Kappa) is the 2 bytes, hex 'CE9A', in utf8. 'Κ' in latin1 is hex 'CE9A' (2 bytes) 'Κ', if converted to utf8 is hex 'C38E C5A1' 'ÃŽÅ¡' is that that looks like when interpreted as latin1.
Note: this last hex is what you show in your Comment.
So, you seem to have "double encoding".
What is missing is where "latin1" is occurring in the flow of the data.