After much effort got it working.
The system will not let me continue as root full stop.
I created a user and granted privileges via mysql, so it should have all worked, but it didn't, it just kept reporting the same error.
So I installed phpMyAdmin, which did not want to install mcrypt, but with a lot of research I was able to get it installed (this is some bug with Ubuntu 18.04 server apparently). Then phpmyadmin hid itself in usr/share, so I had to put a link from /var/www/html to phpmyadmin in usr/share.
phpmyadmin finally worked and to my shock I discovered that the user I had created and given privileges to and was showing as having privileges in mysql, had not been given privileges?? So on the phpmyadmin panel I was able to grant the user priveleges.
And then I was able to log in.
What a journey.
I do not recommend changing the config files as suggested, as it was reporting the correct error, no permission, the problem was mysql not granting the permissions it was supposed to.
I hope this might help any one else with the same headache.