Getting error while starting mysql by just typing in mysql terminal I am getting an error while starting mysql, by just typing mysql in the  terminal:

The error is:

amtz@amtz-VPCEA23EN:~$ mysql
ERROR 1045 (28000): Access denied for user 'amtz'@'localhost' (using password: NO)
That is not how you start mysql from the command line.

When you type mysql in the command line it will launch the mysql-client not the mysql-server, which looks for the user/password options to be provided as arguments, if they aren't provided it will expect them to be specified in ~/.my.cnf or /etc/mysql/my.cnf. If it still can't find the details there then it will then try the your current TTY user, which is what has happened to you.

If you want to login from the command line you can provide the username and password like so:

mysql -u &lt;username&gt; -p


If you don't want to have to do that every time then you can set the details in your ~/.my.cnf file.

[client]
user=&lt;username&gt;
password="&lt;password&gt;"


If you do actually want to start the mysql-server then it would depend on your operating system. For instance on Ubuntu you would do that with:

sudo service mysql start


Generally speaking you should be able to do

/etc/init.d/mysql start