MySQL using all RAM – Stack Exchange Database Administrators

I'm trying to restore a SQL dump file of about 750 MB on Ubuntu 16.04 VM with 1 GB of RAM and MySQL 5.7.21.

I have configured innodb_buffer_pool_size = 768MB, innodb_buffer_pool_chunk_size = 128M and innodb_buffer_pool_instances = 1.

To stop killing killer OOM OOMScoreAdjust = -1000 is added to mysql.sqevice file.

When the restore is started, mysqld has used all the memory.

root @ IA6-OA-DB-01: ~ # free -m
Total used free buff / shared cache available
Mem: 987 925 11 0 50 19
Swap: 632 621 11

He starts killing all the processes.

root @ IA6-OA-DB-01: ~ # mysql -uroot -proot -D OA2017 <OA2017.sql
mysql: [Warning] The use of a password on the command line interface may not be safe.
Kill

syslog

14th April 13:13:35 IA6-OA-DB-01 core: [84990.058935] Insufficient memory: Kill process 24895 (mysql) mark 17 or sacrifice the child
14th April 13:13:35 IA6-OA-DB-01 core: [84990.477043] Out of Memory: The Destruction Process 2226 (sssd_be) scores 3 or sacrifices the child
14th April 13:13:35 IA6-OA-DB-01 core: [84990.747574] Out of Memory: The Destruction Process 2283 (sssd_be) scores 3 or sacrifices the child
14th April 13:13:36 IA6-OA-DB-01 core: [84990.903214] Memory exhausted: destruction process 1587 (smbd) score 3 or sacrifice a child
14th April 13:13:36 IA6-OA-DB-01 core: [84990.971431] Memory exhausted: destruction process 1587 (smbd) score 3 or sacrifice a child
14th April 13:13:36 IA6-OA-DB-01 core: [84991.208088] Out of Memory: Kill 858 (sssd) Process 3 or Sacrifice a Child
14th April 13:13:36 IA6-OA-DB-01 core: [84991.329594] Out of Memory: Kill 858 (sssd) Process 3 or Sacrifice a Child
14th April 13:13:38 IA6-OA-DB-01 core: [84993.369239] Out of Memory: Kill 858 (sssd) Process 3 or Sacrifice a Child
April 14 13:13:39 IA6-OA-DB-01 core: [84994.124215] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
14th April 13:13:41 IA6-OA-DB-01 core: [84995.928253] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
14th April 13:13:44 IA6-OA-DB-01 core: [84999.295787] Insufficient memory: destruction process 1587 (smbd), score 2 or sacrifice of the child
14th April 13:13:48 IA6-OA-DB-01 core: [85003.091554] Out of Memory: Kill 858 (sssd) Process 3 or Sacrifice a Child
14th April 13:13:49 IA6-OA-DB-01 core: [85003.498436] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
14th April 13:13:50 IA6-OA-DB-01 core: [85005.624213] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
14th April 13:13:55 IA6-OA-DB-01 core: [85007.717901] Out of Memory: Kill 858 (sssd) Process 3 or Sacrifice a Child
14th April 13:14:02 IA6-OA-DB-01 core: [85014.623037] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
14th April 13:14:02 IA6-OA-DB-01 core: [85016.130481] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
14th April 13:14:02 IA6-OA-DB-01 core: [85017.218094] Out of Memory: Kill Process 858 (sssd), Mark 2 or Sacrifice Child
Apr 14 13:14:09 IA6-OA-DB-01 core: [85024.577427] Out of Memory: Kill 858 (sssd) Process 3 or Sacrifice a Child
Apr 14 13:14:09 IA6-OA-DB-01 core: [85024.857977] Insufficient memory: the 321 (systemd-journal) deletion process marks 2 or sacrifices the child
14th April 13:14:11 IA6-OA-DB-01 core: [85025.128881] Out of Memory: Process Kill 14831 (bash), score 2 or sacrifice a child
14th April 13:14:11 IA6-OA-DB-01 core: [85025.173233] Out of Memory: Process Kill 14831 (bash), score 2 or sacrifice a child
14th April 13:14:34 IA6-OA-DB-01 core: [85048.414654] Insufficient memory: destruction process 15546 (bash), score 2 or sacrifice of the child
14th April 13:14:34 IA6-OA-DB-01 core: [85048.545329] Insufficient memory: process of destruction 1057 (nginx) score 1 or sacrifice of the child
14th April 13:14:34 IA6-OA-DB-01 core: [85049.430812] Insufficient Memory: Destruction Process 15513 (sshd) score 1 or sacrifice a child
April 14 13:14:46 IA6-OA-DB-01 core: [85060.595291] Insufficient memory: destruction process 1629 (sshd) score 1 or sacrifice a child
April 14 13:14:46 IA6-OA-DB-01 core: [85060.884189] Insufficient memory: destruction process 1629 (sshd) score 1 or sacrifice a child
April 14 13:14:46 IA6-OA-DB-01 core: [85061.268085] Insufficient memory: deletion process 1061 (nginx) score 1 or sacrifice of the child
April 14 13:14:46 IA6-OA-DB-01 core: [85061.470392] Memory exhausted: process of destruction 1280 ((sd-pam)) score 1 or sacrifice a child

After this VM is restarted.
What could be the problem? and What variables do I need to change to make it work?