So we need to know, which grants exist for accounts called root, first:
select concat('"',user,'"@"', host, '"') as root_accounts from mysql.user where user='root' and host not in ('localhost',@@hostname,'127.0.0.1','::1');
kervan: php might connect as "webapp" and you are trying "root"
kervan: are you *actually* doing: -p mypassword
kervan: take out the space: -pmypassword
kervan: or leave out "mypassword" and let it prompt for password interactively