I just wrote a quickie php script to see if the issue is with WP or php, somehow.
<?php
$db=@mysql_connect('<IP Address>', '<username>', '<password>');
if (!$db) echo "connection failed";
else echo "connection succeeded";
?>
Unfortunately, it always says connection failed — even if I put root permissions in there.
Yet, as before, MySQL Workbench connects flawlessly. What am I missing?