So I finally found the solution myself.
Firstly I went into terminal and typed:
mysql -u root -p
This asked for my current password which I typed in and it gave me access to provide more mysql commands. Anything I tried from here gave this error:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
This is confusing because I couldn’t actually see a way of resetting the password using ALTER USER
statement, but I did find another simple solution:
SET PASSWORD = PASSWORD('xxxxxxxx');