Mysqladmin Daily Management Command Summary

Source: Internet
Author: User

Mysqladmin use format for tools:
mysqladmin [option] command [command option] command ...


Parameter options:
-C Number Auto run count, must be used with-I
How long does the-I number interval repeat

1, each two seconds to view the status of the server, a total of 5 times.
# mysqladmin-uroot-p-I 2-c 5 status


2. View the status of the server: status
# mysqladmin-uroot-p Status

3. Change the root password:
# mysqladmin-u root-p original password password ' newpassword '

4. Check if MySQLServer is available:
# mysqladmin-uroot-p Ping

5. Query Server version
# mysqladmin-uroot-p Version

6. View the current value of the server status:
# mysqladmin-uroot-p Extended-status

7. Query server system Variable value:
# mysqladmin-uroot-p variables

8. Display all running processes of the server:
# mysqladmin-uroot-p Processlist
# mysqladmin-uroot-p-i 1 processlist//Refresh once per second

9. Create a Database
# mysqladmin-uroot-p Create Daba-test

10. Delete Database Daba-test
# mysqladmin-uroot-p Drop Daba-test

11. Overloaded Permissions Information
# mysqladmin-uroot-p Reload

12. Refresh all table caches and close and open log
# mysqladmin-uroot-p Refresh

13. Use Safe mode to close the database
# mysqladmin-uroot-p Shutdown

14. Refresh Command mysqladmin flush commands
# mysqladmin-u Root-ptmppassword flush-hosts
# mysqladmin-u Root-ptmppassword flush-logs
# mysqladmin-u Root-ptmppassword flush-privileges
# mysqladmin-u Root-ptmppassword Flush-status
# mysqladmin-u Root-ptmppassword Flush-tables
# mysqladmin-u Root-ptmppassword flush-threads

15. Mysqladmin Execution Kill Process:
# mysqladmin-uroot-p Processlist
# Mysqladmin-uroot-p Kill ID num

16. Stop and start MySQL replication on a slave server
# mysqladmin-u Root-p Stop-slave
# mysqladmin-u Root-p Start-slave

17. Execute multiple commands simultaneously
# mysqladmin-u root-p Process status version

Mysqladmin Daily Management Command Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.