{"id":2264,"date":"2013-07-12T15:26:00","date_gmt":"2013-07-12T07:26:00","guid":{"rendered":"http:\/\/rmohan.com\/?p=2264"},"modified":"2013-07-12T15:26:26","modified_gmt":"2013-07-12T07:26:26","slug":"mysqladmin-tips","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2264","title":{"rendered":"Mysqladmin Tips"},"content":{"rendered":"<div>Here we can see some tips with mysqladmin tool<\/div>\n<div><\/div>\n<div>To check the status of mysqld<\/div>\n<div># mysqladmin -u root -pmysql ping<\/div>\n<div># service mysqld status<\/div>\n<div># mysqladmin -u root -pmysql status<\/div>\n<p>&nbsp;<\/p>\n<div>To find mysql version<\/div>\n<div># mysqladmin -u root -pmysql version<\/div>\n<p>&nbsp;<\/p>\n<div>To view all the MySQL Server status variable and it s current value.<\/div>\n<div># mysqladmin -u root -pmysql extended-status<\/div>\n<p>&nbsp;<\/p>\n<div>To display all MySQL server system variables and the values<\/div>\n<div># mysqladmin -u root -pmysql variables<\/div>\n<p>To display all the running process\/queries in the mysql database.<\/p>\n<div># mysqladmin -u root -pmysql processlist<\/div>\n<p># mysqladmin -u root -pmysql processlist -i 1\u00a0\u00a0&#8212;- run this command automatically every 1 second.<\/p>\n<div>To create a DB<\/div>\n<div># mysqladmin -pmysql create DBtest<\/div>\n<p>&nbsp;<\/p>\n<div>To Drop a DB<\/div>\n<div># mysqladmin -pmysql drop DBtest<\/div>\n<p>&nbsp;<\/p>\n<div>To reload mysqld demon<\/div>\n<div># mysqladmin -pmysql reload<\/div>\n<div># mysqladmin -pmysql refrsh<\/div>\n<p>&nbsp;<\/p>\n<div>To stop mysql daemon<\/div>\n<div># mysqladmin -pmysql shutdow<\/div>\n<p>&nbsp;<\/p>\n<div>Note: You can also use \/etc\/rc.d\/init.d\/mysqld stop to shutdown the server. To start the server, execute \/etc\/rc.d\/init.d\/mysql start<\/div>\n<p>&nbsp;<\/p>\n<div>Mysql flush<\/div>\n<div># mysqladmin -pmysql flush-hosts<\/div>\n<div># mysqladmin -pmysql flush-logs<\/div>\n<div># mysqladmin -pmysql flush-privileges<\/div>\n<div># mysqladmin -pmysql flush-status<\/div>\n<div># mysqladmin -pmysql flush-tables<\/div>\n<div># mysqladmin -pmysql flush-threads<\/div>\n<p><b><br \/>\n<\/b><br \/>\n<b><\/b>flush-hosts: Flush all information in the host cache.<\/p>\n<div>flush-privileges: Reload the grant tables (same as reload).<\/div>\n<div>flush-status: Clear status variables.<\/div>\n<div>flush-threads: Flush the thread cache.<\/div>\n<div>To start and stop MySQL replication on a slave server<\/div>\n<div># mysqladmin -u root -pmysql stop-slave<\/div>\n<div># mysqladmin -u root -pmysql start-slave<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here we can see some tips with mysqladmin tool To check the status of mysqld # mysqladmin -u root -pmysql ping # service mysqld status # mysqladmin -u root -pmysql status <\/p>\n<p>&nbsp;<\/p>\n<p> To find mysql version # mysqladmin -u root -pmysql version <\/p>\n<p>&nbsp;<\/p>\n<p> To view all the MySQL Server status variable and it s current [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2264"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2264"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2264\/revisions"}],"predecessor-version":[{"id":2266,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2264\/revisions\/2266"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}