Webmaster Forum
Go Back   Webmaster Forums UK SEO SEM Webmaster Community Forum > Web Design and Website Development > Programming > MySQL Forums
Register FAQ Members List Downloads Calendar Search Today's Posts Mark Forums Read Webmaster Resources Webmaster Blogs

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2008, 02:47 PM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default tip : performaing basic administration tasks using mysqladmin

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 :

Quote:
mysqladmin [options] command [command-options] [command [command-options]] ...
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 :

Quote:
mysqladmin -u test-user -p create test-db
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!
Reply With Quote
  #2 (permalink)  
Old 04-13-2008, 01:49 PM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default

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 :

Quote:
mysqladmin -u test-user -p drop test-db
3) flush-privileges

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

Quote:
mysqladmin -u root -p flush-privileges
4) password new-password

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

Quote:
mysqladmin -u root -p password 'sample-password'
5) ping

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

Quote:
mysqladmin -u test-user ping
6) reload

This command reloads the privilege grant tables. Example,

Quote:
mysqladmin -u root -p reload
7) shutdown

stops mysql server. Example,

Quote:
mysqladmin -u root -p shutdown
8) status

This command when used displays mysql server status. Example,

Quote:
mysqladmin -u test-user status
9) variables

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

Quote:
mysqladmin -u test-user variables
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!
Reply With Quote
Reply


Useful Resources & Sites
Search Engine Marketing Company
UK Web Hosting
Build One Way Links
 
 
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:53 PM.

UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons.
Subscribe to our feeds   Subscribe to our feeds

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0