Using mysqladmin utility that comes with the install to administer

9:28 PM

1. How to change the root password for Mysql?

mysqladmin -u root -ptmppassword password 'newpassword'

2. How to check whether the MySQL server is running using mysqladmin?

mysqladmin -u root -p ping

3. How do I see what version of MySQL is running using mysqladmin?

mysqladmin -u root -ptmppassword version

4. How to see the status of the MySQL server using mysqladmin?

mysqladmin -u root -ptmppassword status

5. How do I view MySQL status variables and their current value using mysqladmin?

mysqladmin -u root -ptmppassword extended-status

6. How to display all the MySQL server system variables and their values using mysqladmin?


mysqladmin -u root -ptmppassword variables

7. How to display all running processes / queries in the database mysql using mysqladmin?

mysqladmin -u root -ptmppassword processlistYou can use this command to effectively debug any performance problems and determine the process that causes problems by running on autoupdate every secondmysqladmin -u root -ptmppassword -i 1 processlist

8. How to create database a MySQL using mysqladmin?

mysqladmin -u root -ptmppassword create testdb

9. How do I delete the existing database MySQL using mysqladmin?

mysqladmin -u root -ptmppassword drop testdb

10. How to overload all the privileges and rights to the table using mysqladmin?

mysqladmin -u root -ptmppassword reload;
Refresh command resets the table and close / open the log files.
mysqladmin -u root -ptmppassword refresh

11. How to perform a safe way to stop MySQL server using mysqladmin?

mysqladmin -u root -ptmppassword shutdown

12. List of all mysqladmin flush commands.

  1. mysqladmin -u root -ptmppassword flush-hosts
  2. mysqladmin -u root -ptmppassword flush-logs
  3. mysqladmin -u root -ptmppassword flush-privileges
  4. mysqladmin -u root -ptmppassword flush-status
  5. mysqladmin -u root -ptmppassword flush-tables
  6. mysqladmin -u root -ptmppassword flush-threads* Flush-hosts: Reset all the information in the cache hosts.
  • Flush-privileges: Reload right.
  • Flush-status: Clear status variables.
  • Flush-threads: Flush the thread cache.

13. How to kill hung client process to MySQL using mysqladmin?

To kill thread-id 20mysqladmin -u root -ptmppassword kill 20

14. How to start or stop the replication of MySQL on the slave-server using mysqladmin?

mysqladmin -u root -ptmppassword stop-slave
mysqladmin -u root -ptmppassword start-slave

15. How to combine several commands mysqladmin together ?

mysqladmin -u root -ptmppassword pro stat ver
 Use the-h option to connect to remote MySQL server and execute the command.
 mysqladmin -h 192.168.1.112 -u root -ptmppassword pro stat ver
 

 

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results