Chinese Web Sites Using PHP - v2.23, by Herong Yang
mysqladmin - MySQL Admin Tool
This section describes how to use MySQL admin tool to check server status and other admin tasks.
If you want to know whether your MySQL server is alive, you can use the "mysqladmin" program in a command window as shown in the following tutorial:
C:\herong> \local\mysql\bin\mysqladmin -u root ping mysqld is alive
The "mysqld is alive" message tells you that your MySQL server is running ok. If your MySQL server is not running, you will get a "connect ... failed" message.
You can also use "mysqladmin" program to check version number of your MySQL server in a command window as shown in the following tutorial:
C:\herong> \local\mysql\bin\mysqladmin -u root version \local\mysql\bin\mysqladmin.exe Ver 8.0.13 for Win64 on x86_64 (MySQL Community Server - GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 8.0.13 Protocol version 10 Connection localhost via TCP/IP TCP port 3306 Uptime: 7 min 50 sec Threads: 2 Questions: 5 Slow queries: 0 Opens: 113 Flush tables: 2 Open tables: 89 Queries per second avg: 0.010
The output in the above example tells you that the version number is 8.0.13
If you want to know what else you can do with "mysqladmin", you should run the "-?" option:
C:\herong> \local\mysql\bin\mysqladmin -? ... Administration program for the mysqld daemon. Usage: \local\mysql\bin\mysqladmin [OPTIONS] command command.... -c, --count=# Number of iterations to make. This works with -i (--sleep) only. ... Where command is a one or more of: (Commands may be shortened) create databasename Create a new database debug Instruct server to write debug information drop databasename Delete a database and all its tables extended-status Gives an extended status message flush-hosts Flush all cached hosts flush-logs Flush all logs flush-status Clear status variables flush-tables Flush all tables flush-threads Flush the thread cache flush-privileges Reload grant tables (same as reload) kill id,id,... Kill mysql threads password new-password Change old password to new-password, MySQL 4.1 hashing. old-password new-password Change old password to new-password in old format. ping Check if mysqld is alive processlist Show list of active threads in server reload Reload grant tables refresh Flush all tables and close and open logfiles shutdown Take server down status Gives a short status message from the server start-slave Start slave stop-slave Stop slave variables Prints variables available version Get version info from server
Table of Contents
PHP Installation on Windows Systems
Integrating PHP with Apache Web Server
charset="*" - Encodings on Chinese Web Pages
Chinese Characters in PHP String Literals
Multibyte String Functions in UTF-8 Encoding
Input Text Data from Web Forms
Input Chinese Text Data from Web Forms
►MySQL - Installation on Windows
MySQL 8.0 Download, Installation and Start
►mysqladmin - MySQL Admin Tool
Creating Database and User with MySQL Monitor
Creating a Test Table - Comment
MySQL - Connecting PHP to Database
MySQL - Character Set and Encoding
MySQL - Sending Non-ASCII Text to MySQL
Retrieving Chinese Text from Database to Web Pages
Input Chinese Text Data to MySQL Database