ssh-keygen #без аргументов, на все вопросы жать enter
ssh-copy-id user@server.com #user - это юзер на сервере server.com, а не локальный
<form>
<input type="text">
<input type="file">
<button type="submit">OK</button>
</form>
@app.route('/test', methods=['GET', 'POST'])
def test():
form = request.form
sqlite_log = logging.getLogger("sqlite")
sqlite_log.setLevel(logging.ERROR)
Causes:
Master server has crashed and the binlog cache has not been flushed to disk. Slave has recieved a new position, did not recieve data, and data gets lost in a crash (however it might have been written to table, but not in binlog).
Solution:
Use this CHANGE MASTER statement on the slave.
CHANGE MASTER TO MASTER_LOG_FILE=[NEXT FILE], MASTER_LOG_POS=4;
SLAVE START;
in my case that would be
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000034', MASTER_LOG_POS=4;
SLAVE START;
I don't know why the master log position needs to be 4 for the new file.
What happens:
When the master server restarts it logs binary changes to a new binlog file, so that we minimize data loss by skipping to the next file (everything from the previous file was written already).
Prevention:
Add this line to my.cnf:
sync_binlog = 1
With this setting the master server flushes cache in the binlog after every write, so that in case of a crash you can lose one statement at most.