MySQL:Administration Tools


 * Home
 * Administration Tools
 * Backup and Restore
 * Security
 * User Account Management
 * Utility

phpMyAdmin
phpMyAdmin is a web based tool used to control mysql. To run phpmyadmin ensure that apache and mysql are running on your xampp control panel application. Then hit the admin button associated with apache. This will launch the http://localhost/xampp/ in your web browser. On the left pane click on phpmyadmin near the bottom which changes the URL to http://localhost/phpmyadmin. You can then use the web based gui to use and manage your database(s) configured in mysql. Visit the links below for phpmyadmin features and guides.

http://www.reg.ca/faq/PhpMyAdminTutorial.html

http://www.youtube.com/watch?v=1-81n_vuwug



Currently phpMyAdmin can:
 * browse and drop databases, tables, views, columns and indexes
 * create, copy, drop, rename and alter databases, tables, columns and indexes
 * maintenance server, databases and tables, with proposals on server configuration
 * execute, edit and bookmark any SQL-statement, even batch-queries
 * load text files into tables
 * create and read dumps of tables
 * export1 data to various formats: CSV, XML, PDF, ISO/IEC 26300 - OpenDocument Text and Spreadsheet, Word, and LATEX formats
 * import data and MySQL structures from OpenDocument spreadsheets, as well as XML, CSV, and SQL files
 * administer multiple servers
 * manage MySQL users and privileges
 * check referential integrity in MyISAM tables
 * using Query-by-example (QBE), create complex queries automatically connecting required tables
 * create PDF graphics of your Database layout
 * search globally in a database or a subset of it
 * transform stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link
 * track changes on databases, tables and views
 * support InnoDB tables and foreign keys (see FAQ 3.6)
 * support mysqli, the improved MySQL extension (see FAQ 1.17)
 * create, edit, call, export and drop stored procedures and functions
 * create, edit, export and drop events and triggers
 * communicate in 62 different languages
 * synchronize two databases residing on the same as well as remote servers

mysqladmin
mysqladmin is the client used for performing mysql administrative functions. Launch mysqladmin from the bin directory not after you launch mysql. To start mysqladmin use the following syntax: mysqladmin [options] command [command-arg] [command [command-arg]]

Example:

C:\xampp\mysql\bin>mysqladmin –user root –password=myrootpassword choose_your_command_here

To see the full list of command options:

C:\xampp\mysql\bin>mysqladmin –user root –password=myrootpassword

Or if no users are configured:

C:\xampp\mysql\bin>mysqladmin

Tips and Tricks
1. How to check if mysql is up and running

C:\xampp\mysql\bin> mysqladmin -u root –pmypassword ping

2. What is the current status of your mysql server?

C:\xampp\mysql\bin> mysqladmin -u root –pmypassword status

3. What version of mysql am I running

C:\xampp\mysql\bin> mysqladmin -u root -pmypassword version

'''4. How to display the currently running processes and or queries. ''' C:\xampp\mysql\bin> mysqladmin -u root -pmypassword processlist

5. List of flush commands.

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword flush-hosts

• flush-hosts: Flush all information in the host cache

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword flush-logs

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword flush-privileges

• flush-privileges: Reload the grant tables

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword flush-status

• flush-status: Clear status variables

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword flush-tables

•flush-threads: Flush the thread cache

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword flush-threads

6. How to shutdown. C:\xampp\mysql\bin> mysqladmin -u root -pmypassword shutdown

7. How to kill a process.

First identify the hanging MySQL client process using the processlist command.

C:\xampp\mysql\bin> mysqladmin -u root -pmypassword processlist

Next, kill process that is having trouble by the process ID number.

C:\xampp\mysql\bin> mysqladmin -u root –pmypassword kill 20

8. Combine multiple commands together.

C:\xampp\mysql\bin>mysqladmin -u root -pmypassword version status process-list

9. Run mysqladmin on a remote server.

C:\xampp\mysql\bin>mysqladmin -h 192.1.1.10 -u root -pmypassword status