MySQL Useful Command

If you are the database administrator, today post will help you to mange your server easily.

mysqladmin ping
-check whether the server is alive

mysqladmin status
-display a short server status message.

mysqladmin variable
-display the server system variables and their value.

mysqladmin proc stat
-all command shortened

mysqladmin processlist
-Shows active mysql connections and queries

mysqladmin drop database_name
-Dropsdeletes the selected database

mysqladmin create database_name
-Creates a mysql database

mysql -u username -p password databasename < databasefile.sql
-Restores a MySQL database from databasefile.sql

mysqldump -u username -p password databasename > databasefile.sql
-Backup MySQL database to databasefile.sql

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.

One thought on “MySQL Useful Command”

  1. just wanted to share useful command obviously that i know

    Steps to check uptime of MySQL service:

    [1] Login to the server via SSH (for Linux) or MySQL server through command line (for windows).

    [2] Type the command mysql

    Now, you will be able see the mysql prompt (mysql>). From here, you can manage the MySQL services as well databases.

    [3] To check the uptime of the MySQL service shoot out the command


Comments are closed.