Category Covered

how to access mysql database using ssh or shell script

 

 

 

 

 

 

 

 

 

Hope you have already install SSh or puty on your computer and now open the ssh or puty
System may ask you credential to access the the panel.

After access you may get something like that
[root@WAP ~]#
so to know the status of your mysql write "service mysqld status" and press enter. Then

you will see the status of mysql.

[root@WAP ~]# service mysqld status
mysqld (pid 3186) is running...

Now if you wish to access the mysql using ssh then write "mysql -u root". System will

ask you for password. Enter your password. You may not see it.

[root@WAP ~]# mysql -u root
Enter password:

Now you logged in as root into your mysql database. So now you can execute any kind of

query of mysql in here.