Make sure that you have installed the mysql-server, not the mysql-client or something else.
error means the file /var/run/mysqld/mysqld.sock doesn't exists
Hence
Install it using following command
sudo apt-get install mysql-server
But if the mysql-server is already installed and is running, then you need to check the config files.
The config files are:
The config files are:
/etc/my.cnf
/etc/mysql/my.cnf
/var/lib/mysql/my.cnf
Let the mysql use the /etc/my.cnf by renaming the /etc/mysql/my.cnf.
Then prob may solve.
Perhaps the best MySQL tool, with a GUI and IDE, can help you in this situation. You can use mysql gui for linux https://www.devart.com/dbforge/mysql/studio/ by dbForge Studio and it will help you with many tasks. And you can also optimize your daily workflow, and automate the management of database objects, and much more.