Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

How do I launch mysql from sandbox on azure .

New Contributor

I am getting the below error :

[biswas5375@sandbox-host ~]$ mysql
-bash: mysql: command not found
[biswas5375@sandbox-host ~]$ ssh -p 2222 root@localhost
root@localhost's password:
Last login: Fri Jun 22 18:13:17 2018 from
[root@sandbox-hdp ~]#
[root@sandbox-hdp ~]#
[root@sandbox-hdp ~]#
[root@sandbox-hdp ~]#
[root@sandbox-hdp ~]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@sandbox-hdp ~]#


Are you attempting to log into the mysql instance or are you trying to determine if the mysql instance is running or not?

If the former, your access is being denied because you're not supplying the password to the server and so you must invoke the mysql command using the "--password" command line argument and actually supply the relevant password.

If the latter, try using the mysqladmin command instead of the mysql command. mysqladmin is a utility for performing administrative operations:

[root@sandbox-hdp ~]# mysqladmin -u root -p status

If the mysql server is actually running it will return output displaying the uptime, number of running threads, and so on. If the server is not running then it will display an error message indicating that the connection to the server failed.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Super Mentor

@Kishalay Biswas

Instead of trying "[root@sandbox-hdp ~]# mysql -u root" can you also add '-p' option as well in the command line as :

# mysql -u root -p
Enter password: hadoop


Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.