accessing phpmyadmin db from terminal now in ubuntu 13.04 i firstly installed mysql server with
sudo apt-get install mysql-server
mysql server version 5.5 now in terminal i can check if it is working by
sudo netstat -tap | grep mysql
it responds me by prompting me for password and then
tcp 0 0 localhost:mysql *:* LISTEN 26214/mysqld
but to connect using my root account i typed mysql -u root -p
prompting for password it shows
ERROR 1045 (28000): Access denied for user 'username'@'localhost' (using password: YES)
when i try this /opt/lampp/bin/mysql -u root -p
it ask for password and says
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
what is there in /etc/mysql/my.cnf
and what is in /opt/lampp/bin/mysql
any solution?