I'm newbie in MySQL. I installed MySQL5.5 Server and Client in my Debian Wheezy. All I did was enter aptitude install myqsl-server. Now, I have no idea what to do!

I found a webpage that says I have to set up a root user password first, and, to do that, I have to enter with the following command:

mysqladmin -u root password NEWPASSWORD

Where "NEWPASSWORD" is, well, the new password. The rest are literally commands. So, I opened my terminal and as normal user, tried to enter with this command and I got this output:

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

So, considering all I did, what are the next steps? I have to create a root user password, but for what? And after that what do I have to do to create a simple table representing data?

All tutorials I read on the internet are very difficult to understand!

  • 1
    You might need to start mysql first. Maybe something like mysql.server start?
    – Mark M
    Jun 28, 2014 at 1:28

3 Answers 3


this alert:

Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

properbly shows that your MySQLd didn't start up,

you could use

ps -ef|grep mysql


netstat -ltunp|grep mysql


mysqld_multi status

to check your mysqld process status depending on your installation method.

otherwise, strongly reconmmend you always keep your eyes on error log, it will extactly tell you what has happed about the sever! before start mysqld you could watch error log by:

tail -f error.log

meanwhile, do make sure your have installed mysql database, which you might type commands like:

mysql_install_db --datadir=/data/mysqldata3308/mydata/

and check out wether datadir or basedir are owned by USER and GROUP "mysql"

first time install mysql always be not so easy, but with comparing to other commerce database management softwares, MySQL obviouslly are one of the most easiests.


It seems that your server are down, you should start your mysql server first.


It seems like your MySQL service is not running. Start it by

sudo service mysql start

Then, you need to run

sudo mysql_secure_installation

which will take you through all necessary steps interactively where you will be asked to setup a root password and configure your MySQL setup securely.