Try sudo mysql -u root -p
.
I believe it's some kind of security feature or something like that (not entirely sure). But with su/sudo rights, you can connect to the socket. The -p
option will ask for password input
Added after a comment about symbols in the password:
My assumption is that the encoding of these characters isn't correct (ASCII connection, and non-ASCII charaters). Try connection with the following command, as stated in this SO answer by Martin Taleski
sudo mysql --default-character-set=utf8 -u root -p
You can set this as a default in the /etc/mysql/my.cnf
file.
[mysql]
default-character-set=utf8