Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

tip : performaing basic administration tasks using mysqladmin

Discussion in 'Programming' started by dman_2007, Apr 12, 2008.

  1. dman_2007

    dman_2007 Guest

    Mysql server comes with a very handy command line utility called mysqladmin. It can be used to perform basic server administration tasks easily. Basic format of using mysqladmin is :

    command specifies the administration task that mysqladmin has to perform. Following is the list of important commands mysqladmin supports :

    1) create db_name

    Create command can be used for creating a new database. The user specified must have the proper privileges to be able to create the new database, otherwise the command will fail. Example :

    the command given above prompts for the password for test-user and after reading the password, it connects to mysql server as test-user. After successful login, it will try to create a new db named test-db.

    I'll discuss more commands in my next post.
  2. dman_2007

    dman_2007 Guest

    2) drop db_name

    This command is used for deleting an existing database. Again, the user specified must have the proper privileges to be able to delete the database, otherwise the command will fail. Example :

    3) flush-privileges

    This command is same as reload command. It can be used for reloading privilege grant tables. Example,

    4) password new-password

    password command is used for changing the password of the user you use to connect to mysql server. EXample,

    5) ping

    pings to check whether the server is working or not. Example,

    6) reload

    This command reloads the privilege grant tables. Example,

    7) shutdown

    stops mysql server. Example,

    8) status

    This command when used displays mysql server status. Example,

    9) variables

    This command is used for displaying server system variables and their values. Example,


Featured Resources (View All)

Share This Page