MySQL SET PASSWORD Statement Syntax
The syntax for the MySQL SET PASSWORD statement to change an arbitrary user's password is as follows:
SET PASSWORD FOR 'user'@'host' = PASSWORD('newpassword');
To change your own password, the syntax is:
SET PASSWORD = PASSWORD('newpassword');
That is, to change another user's password, you will need to specify their username and hostname exactly as it is in the User and Host columns in the mysql.user table.
SELECT name, SUM(price) FROM subrequests GROUP BY request_id
150617 8:42:00 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
150617 8:42:00 InnoDB: Assertion failure in thread 139884593407744 in file trx0purge.c line 840
InnoDB: Failing assertion: purge_sys->purge_trx_no <= purge_sys->rseg->last_trx_no
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: dev.mysql.com/doc/refman/5.5/en/forcing-innodb-rec...
InnoDB: about forcing recovery.
select *
from t1
inner join t2 on t1.link_field = t2.link_field and t2.some_field <> 0 and t2.other_field <> 0
мне нужно, для которых нет ни одного значения равного нулю
select * from t1 where id not in (select id_field from t2 where some_field = 0)
Вообще таблицы такие:
questions(id, text), answers(id, question_id, answer, text), history(id, user_id, answer_id, question_id, test_id), history_tests(id, date), нужно вывести все вопросы, на которые все существующие ответы верны.
select q.*
from questions q
inner join history h on h.question_id = q.id
where q.id not in (
select a.question_id
from answers a
inner join history h on a.id = h.answer_id and a.answer = 0
)
select birthday
from some_table
order by dayofyear(birthday - interval dayofyear(now()) -1 day) asc
limit 3