title: Alter table with adding Indexes to table [MariaDB]
body: <p>I have a table where I'm trying to add indexes to it, but for some reason it writes out an error.
  I use <code>MySQL Workbench 8.0.17</code>, and the database is <code>10.1.25-MariaDB</code>.</p>
  <p>The error I get when I use my workbench to add indexes is the following:</p>
  <p><a href="https://i.stack.imgur.com/bfdz3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bfdz3.png" alt="enter image description here" /></a></p>
  <p>It's the first time I try this, so I don't know what I'm doing wrong here?</p>
  <p>Extra information about my tables: one of my tables is called <code>TestResults</code> and it has the following columns:</p>
  <p><a href="https://i.stack.imgur.com/iuS6M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iuS6M.png" alt="enter image description here" /></a></p>
  <p>I then made a table that links <code>TestResults</code> and another table called <code>testcaserequirement</code> together, and this table is called <code>testresultsrequirementlink</code> which has the id's of both tables in each column.</p>
  <p><a href="https://i.stack.imgur.com/6eUO7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6eUO7.png" alt="enter image description here" /></a></p>
  <p>Here I want to make <code>requimrentId</code> and <code>testresultId</code> a  <strong>index</strong> and also make a <strong>foreign key</strong> between <code>testresultsrequirementlink.testresultId</code> and <code>testresults.id</code> and  also between <code>testresultsrequirementlink.requirementId</code> and <code>testcaserequirement.id</code>.</p>
  <p><strong>EDIT</strong></p>
  <p>I've looked at MariaDB syntax, and found two examples, but my database 'Lost connection' during the sql query run?`</p>
  <p><a href="https://i.stack.imgur.com/i85qP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i85qP.png" alt="enter image description here" /></a></p>