Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Today at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Yesterday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Sunday at 6:10 AM
Ad icon
QA Engineer Intern
pramukag
Updated:
Sunday at 6:07 AM
Ad icon
Sell your Land, House on idamata.lk for FREE
sajith.xp.pk
Updated:
Jun 25, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
20 MySQL (Mysqladmin) Commands for Database Administration in Linux
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="y_rangana" data-source="post: 13971541" data-attributes="member: 15719"><p>mysqladmin is a command-line utility the comes with MySQL server and it is used by Database Administrators to perform some basic MySQL tasks easily such as setting root password, changing root password, monitoring mysql processes, reloading privileges, checking server status etc.</p><p></p><p>In this article we’ve compiled some very useful ‘mysqladmin‘ commands that are used by system/database administrators in their day-to-day work. You must have MySQL server installed on your system to perform these tasks.</p><p></p><p>If you don’t have MySQL server installed or you are using older version of MySQL server, then we recommend you all to install or update your version by following our below article.</p><p></p><p> Installation of MySQL 5.5.28 Server on RHEL/CentOS/Fedora</p><p></p><p>1. <strong>How to set MySQL Root password?</strong></p><p></p><p>If you have fresh installation of MySQL server, then it doesn’t required any password to connect it as root user. To set MySQL password for root user, use the following command.</p><p></p><p># <em>mysqladmin -u root password YOURNEWPASSWORD</em></p><p></p><p>2. <strong>How to Change MySQL Root password?</strong></p><p></p><p>If you would like to change or update MySQL root password, then you need to type the following command. For example, say your old password is 123456 and you want to change it with new password say xyz123.</p><p></p><p><em>mysqladmin -u root -p123456 password 'xyz123'</em></p><p></p><p>3. <strong>How to check MySQL Server is running?</strong></p><p></p><p>To find out whether MySQL server is up and running, use the following command.</p><p></p><p>#<em> mysqladmin -u root -p ping</em></p><p></p><p>Enter password:</p><p>mysqld is alive</p><p></p><p>4. <strong>How to Check which MySQL version I am running?</strong></p><p></p><p>The following command shows MySQL version along with the current running status .</p><p></p><p># <em>mysqladmin -u root -p version</em></p><p></p><p>Enter password:</p><p>mysqladmin Ver 8.42 Distrib 5.5.28, for Linux on i686</p><p>Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.</p><p></p><p>Oracle is a registered trademark of Oracle Corporation and/or its</p><p>affiliates. Other names may be trademarks of their respective</p><p>owners.</p><p></p><p>Server version 5.5.28</p><p>Protocol version 10</p><p>Connection Localhost via UNIX socket</p><p>UNIX socket /var/lib/mysql/mysql.sock</p><p>Uptime: 7 days 14 min 45 sec</p><p></p><p>Threads: 2 Questions: 36002 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.059</p><p></p><p>4.<strong> How to Find out current Status of MySQL server?</strong></p><p></p><p>To find out current status of MySQL server, use the following command. The mysqladmin command shows the status of uptime with running threads and queries.</p><p></p><p># <em>mysqladmin -u root -ptmppassword status</em></p><p></p><p>Enter password:</p><p>Uptime: 606704 Threads: 2 Questions: 36003 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.059</p><p></p><p>6.<strong> How to check status of all MySQL Server Variable’s and value’s?</strong></p><p></p><p>To check all the running status of MySQL server variables and values, type the following command. The output would be similar to below.</p><p></p><p># <em>mysqladmin -u root -p extended-status</em></p><p></p><p>Enter password:</p><p>+------------------------------------------+-------------+</p><p>| Variable_name | Value |</p><p>+------------------------------------------+-------------+</p><p>| Aborted_clients | 3 |</p><p>| Aborted_connects | 3 |</p><p>| Binlog_cache_disk_use | 0 |</p><p>| Binlog_cache_use | 0 |</p><p>| Binlog_stmt_cache_disk_use | 0 |</p><p>| Binlog_stmt_cache_use | 0 |</p><p>| Bytes_received | 6400357 |</p><p>| Bytes_sent | 2610105 |</p><p>| Com_admin_commands | 3 |</p><p>| Com_assign_to_keycache | 0 |</p><p>| Com_alter_db | 0 |</p><p>| Com_alter_db_upgrade | 0 |</p><p>| Com_alter_event | 0 |</p><p>| Com_alter_function | 0 |</p><p>| Com_alter_procedure | 0 |</p><p>| Com_alter_server | 0 |</p><p>| Com_alter_table | 0 |</p><p>| Com_alter_tablespace | 0 |</p><p>+------------------------------------------+-------------+</p><p></p><p>7. <strong>How to see all MySQL server Variables and Values?</strong></p><p></p><p>To see all the running variables and values of MySQL server, use the command as follows.</p><p></p><p>#<em> mysqladmin -u root -p variables</em></p><p></p><p>Enter password:</p><p>+---------------------------------------------------+----------------------------------------------+</p><p>| Variable_name | Value |</p><p>+---------------------------------------------------+----------------------------------------------+</p><p>| auto_increment_increment | 1 |</p><p>| auto_increment_offset | 1 |</p><p>| autocommit | ON |</p><p>| automatic_sp_privileges | ON |</p><p>| back_log | 50 |</p><p>| basedir | /usr |</p><p>| big_tables | OFF |</p><p>| binlog_cache_size | 32768 |</p><p>| binlog_direct_non_transactional_updates | OFF |</p><p>| binlog_format | STATEMENT |</p><p>| binlog_stmt_cache_size | 32768 |</p><p>| bulk_insert_buffer_size | 8388608 |</p><p>| character_set_client | latin1 |</p><p>| character_set_connection | latin1 |</p><p>| character_set_database | latin1 |</p><p>| character_set_filesystem | binary |</p><p>| character_set_results | latin1 |</p><p>| character_set_server | latin1 |</p><p>| character_set_system | utf8 |</p><p>| character_sets_dir | /usr/share/mysql/charsets/ |</p><p>| collation_connection | latin1_swedish_ci |</p><p>+---------------------------------------------------+----------------------------------------------+</p><p></p><p>8. <strong>How to check all the running Process of MySQL server?</strong></p><p></p><p>The following command will display all the running process of MySQL database queries.</p><p></p><p># <em>mysqladmin -u root -p processlist</em></p><p></p><p>Enter password:</p><p>+-------+---------+-----------------+---------+---------+------+-------+------------------+</p><p>| Id | User | Host | db | Command | Time | State | Info |</p><p>+-------+---------+-----------------+---------+---------+------+-------+------------------+</p><p>| 18001 | rsyslog | localhost:38307 | rsyslog | Sleep | 5590 | | |</p><p>| 18020 | root | localhost | | Query | 0 | | show processlist |</p><p>+-------+---------+-----------------+---------+---------+------+-------+------------------+</p><p></p><p>9. <strong>How to create a Database in MySQL server?</strong></p><p></p><p>To create a new database in MySQL server, use the command as shown below.</p><p></p><p># <em>mysqladmin -u root -p create databasename</em></p><p></p><p>Enter password:</p><p></p><p># <em>mysql -u root -p</em></p><p></p><p>Enter password:</p><p>Welcome to the MySQL monitor. Commands end with ; or \g.</p><p>Your MySQL connection id is 18027</p><p>Server version: 5.5.28 MySQL Community Server (GPL) by Remi</p><p></p><p>Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.</p><p></p><p>Oracle is a registered trademark of Oracle Corporation and/or its</p><p>affiliates. Other names may be trademarks of their respective</p><p>owners.</p><p></p><p>Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.</p><p></p><p>mysql> show databases;</p><p>+--------------------+</p><p>| Database |</p><p>+--------------------+</p><p>| information_schema |</p><p>| databasename |</p><p>| mysql |</p><p>| test |</p><p>+--------------------+</p><p>8 rows in set (0.01 sec)</p><p></p><p>mysql></p><p></p><p>10. <strong>How to drop a Database in MySQL server?</strong></p><p></p><p>To drop a Database in MySQL server, use the following command. You will be asked to confirm press ‘y‘.</p><p></p><p># <em>mysqladmin -u root -p drop databasename</em></p><p></p><p>Enter password:</p><p>Dropping the database is potentially a very bad thing to do.</p><p>Any data stored in the database will be destroyed.</p><p></p><p>Do you really want to drop the 'databasename' database [y/N] y</p><p>Database "databasename" dropped</p><p></p><p>11. <strong>How to reload/refresh MySQL Privileges?</strong></p><p></p><p>The reload command tells the server to reload the grant tables. The refresh command flushes all tables and reopens the log files.</p><p><em></em></p><p><em># mysqladmin -u root -p reload;</em></p><p><em># mysqladmin -u root -p refresh</em></p><p></p><p>12. <strong>How to shutdown MySQL server Safely?</strong></p><p></p><p>To shutdown MySQL server safely, type the following command.</p><p></p><p><em>mysqladmin -u root -p shutdown</em></p><p></p><p>Enter password:</p><p></p><p>You can also use the following commands to start/stop MySQL server.</p><p><em></em></p><p><em># /etc/init.d/mysqld stop</em></p><p><em># /etc/init.d/mysqld start</em></p><p></p><p>13. <strong>Some useful MySQL Flush commands</strong></p><p></p><p>Following are some useful flush commands with their description.</p><p></p><p> flush-hosts: Flush all host information from host cache.</p><p> flush-tables: Flush all tables.</p><p> flush-threads: Flush all threads cache.</p><p> flush-logs: Flush all information logs.</p><p> flush-privileges: Reload the grant tables (same as reload).</p><p> flush-status: Clear status variables.</p><p></p><p># <em>mysqladmin -u root -p flush-hosts</em></p><p><em># mysqladmin -u root -p flush-tables</em></p><p><em># mysqladmin -u root -p flush-threads</em></p><p><em># mysqladmin -u root -p flush-logs</em></p><p><em># mysqladmin -u root -p flush-privileges</em></p><p><em># mysqladmin -u root -p flush-status</em></p><p></p><p>14. <strong>How to kill Sleeping MySQL Client Process?</strong></p><p></p><p>Use the following command to identify sleeping MySQL client process.</p><p></p><p>#<em> mysqladmin -u root -p processlist</em></p><p></p><p>Enter password:</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>| Id | User | Host | db | Command | Time | State | Info |</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>| 5 | root | localhost | | Sleep | 14 | | |</p><p>| 8 | root | localhost | | Query | 0 | | show processlist |</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p></p><p>Now, run the following command with kill and process ID as shown below.</p><p></p><p># <em>mysqladmin -u root -p kill 5</em></p><p></p><p>Enter password:</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>| Id | User | Host | db | Command | Time | State | Info |</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>| 12 | root | localhost | | Query | 0 | | show processlist |</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p></p><p>If you like to kill multiple process, then pass the process ID‘s with comma separated as shown below.</p><p></p><p>#<em> mysqladmin -u root -p kill 5,10</em></p><p></p><p>15.<strong> How to run multiple mysqladmin commands together?</strong></p><p></p><p>If you would like to execute multiple ‘mysqladmin‘ commands together, then the command would be like this.</p><p></p><p># <em>mysqladmin -u root -p processlist status version</em></p><p><em></em></p><p>Enter password:</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>| Id | User | Host | db | Command | Time | State | Info |</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>| 8 | root | localhost | | Query | 0 | | show processlist |</p><p>+----+------+-----------+----+---------+------+-------+------------------+</p><p>Uptime: 3801 Threads: 1 Questions: 15 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.003</p><p>mysqladmin Ver 8.42 Distrib 5.5.28, for Linux on i686</p><p>Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.</p><p></p><p>Oracle is a registered trademark of Oracle Corporation and/or its</p><p>affiliates. Other names may be trademarks of their respective</p><p>owners.</p><p></p><p>Server version 5.5.28</p><p>Protocol version 10</p><p>Connection Localhost via UNIX socket</p><p>UNIX socket /var/lib/mysql/mysql.sock</p><p>Uptime: 1 hour 3 min 21 sec</p><p></p><p>Threads: 1 Questions: 15 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.003</p><p></p><p>16. <strong>How to Connect remote mysql server</strong></p><p><strong></strong></p><p>To connect remote MySQL server, use the -h (host) with IP Address of remote machine.</p><p></p><p># <em>mysqladmin -h 172.16.25.126 -u root -p</em></p><p></p><p>17. <em>How to execute command on remote MySQL server</em></p><p></p><p>Let’s say you would like to see the status of remote MySQL server, then the command would be.</p><p></p><p># <em>mysqladmin -h 172.16.25.126 -u root -p status</em></p><p></p><p>18. <strong>How to start/stop MySQL replication on a slave server?</strong></p><p><strong></strong></p><p>To start/stop MySQL replication on salve server, use the following commands.</p><p></p><p># <em>mysqladmin -u root -p start-slave</em></p><p></p><p># <em>mysqladmin -u root -p stop-slave</em></p><p></p><p>19. <strong>How to store MySQL server Debug Information to logs?</strong></p><p></p><p>It tells the server to write debug information about locks in use, used memory and query usage to the MySQL log file including information about event scheduler.</p><p></p><p># <em>mysqladmin -u root -p debug</em></p><p></p><p>Enter password:</p><p></p><p>20. <strong>How to view mysqladmin options and usage</strong></p><p></p><p>To find out more options and usage of myslqadmin command use the help command as shown below. It will display a list of available options.</p><p></p><p>#<em> mysqladmin --help</em></p><p></p><p>We have tried our best to include almost all of ‘mysqladmin‘ commands with their examples in this article, If still, we’ve missed anything, please do let us know via comments and don’t forget to share with your friends.</p></blockquote><p></p>
[QUOTE="y_rangana, post: 13971541, member: 15719"] mysqladmin is a command-line utility the comes with MySQL server and it is used by Database Administrators to perform some basic MySQL tasks easily such as setting root password, changing root password, monitoring mysql processes, reloading privileges, checking server status etc. In this article we’ve compiled some very useful ‘mysqladmin‘ commands that are used by system/database administrators in their day-to-day work. You must have MySQL server installed on your system to perform these tasks. If you don’t have MySQL server installed or you are using older version of MySQL server, then we recommend you all to install or update your version by following our below article. Installation of MySQL 5.5.28 Server on RHEL/CentOS/Fedora 1. [B]How to set MySQL Root password?[/B] If you have fresh installation of MySQL server, then it doesn’t required any password to connect it as root user. To set MySQL password for root user, use the following command. # [I]mysqladmin -u root password YOURNEWPASSWORD[/I] 2. [B]How to Change MySQL Root password?[/B] If you would like to change or update MySQL root password, then you need to type the following command. For example, say your old password is 123456 and you want to change it with new password say xyz123. [I]mysqladmin -u root -p123456 password 'xyz123'[/I] 3. [B]How to check MySQL Server is running?[/B] To find out whether MySQL server is up and running, use the following command. #[I] mysqladmin -u root -p ping[/I] Enter password: mysqld is alive 4. [B]How to Check which MySQL version I am running?[/B] The following command shows MySQL version along with the current running status . # [I]mysqladmin -u root -p version[/I] Enter password: mysqladmin Ver 8.42 Distrib 5.5.28, for Linux on i686 Copyright (c) 2000, 2012, 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 5.5.28 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 7 days 14 min 45 sec Threads: 2 Questions: 36002 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.059 4.[B] How to Find out current Status of MySQL server?[/B] To find out current status of MySQL server, use the following command. The mysqladmin command shows the status of uptime with running threads and queries. # [I]mysqladmin -u root -ptmppassword status[/I] Enter password: Uptime: 606704 Threads: 2 Questions: 36003 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.059 6.[B] How to check status of all MySQL Server Variable’s and value’s?[/B] To check all the running status of MySQL server variables and values, type the following command. The output would be similar to below. # [I]mysqladmin -u root -p extended-status[/I] Enter password: +------------------------------------------+-------------+ | Variable_name | Value | +------------------------------------------+-------------+ | Aborted_clients | 3 | | Aborted_connects | 3 | | Binlog_cache_disk_use | 0 | | Binlog_cache_use | 0 | | Binlog_stmt_cache_disk_use | 0 | | Binlog_stmt_cache_use | 0 | | Bytes_received | 6400357 | | Bytes_sent | 2610105 | | Com_admin_commands | 3 | | Com_assign_to_keycache | 0 | | Com_alter_db | 0 | | Com_alter_db_upgrade | 0 | | Com_alter_event | 0 | | Com_alter_function | 0 | | Com_alter_procedure | 0 | | Com_alter_server | 0 | | Com_alter_table | 0 | | Com_alter_tablespace | 0 | +------------------------------------------+-------------+ 7. [B]How to see all MySQL server Variables and Values?[/B] To see all the running variables and values of MySQL server, use the command as follows. #[I] mysqladmin -u root -p variables[/I] Enter password: +---------------------------------------------------+----------------------------------------------+ | Variable_name | Value | +---------------------------------------------------+----------------------------------------------+ | auto_increment_increment | 1 | | auto_increment_offset | 1 | | autocommit | ON | | automatic_sp_privileges | ON | | back_log | 50 | | basedir | /usr | | big_tables | OFF | | binlog_cache_size | 32768 | | binlog_direct_non_transactional_updates | OFF | | binlog_format | STATEMENT | | binlog_stmt_cache_size | 32768 | | bulk_insert_buffer_size | 8388608 | | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | | collation_connection | latin1_swedish_ci | +---------------------------------------------------+----------------------------------------------+ 8. [B]How to check all the running Process of MySQL server?[/B] The following command will display all the running process of MySQL database queries. # [I]mysqladmin -u root -p processlist[/I] Enter password: +-------+---------+-----------------+---------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +-------+---------+-----------------+---------+---------+------+-------+------------------+ | 18001 | rsyslog | localhost:38307 | rsyslog | Sleep | 5590 | | | | 18020 | root | localhost | | Query | 0 | | show processlist | +-------+---------+-----------------+---------+---------+------+-------+------------------+ 9. [B]How to create a Database in MySQL server?[/B] To create a new database in MySQL server, use the command as shown below. # [I]mysqladmin -u root -p create databasename[/I] Enter password: # [I]mysql -u root -p[/I] Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 18027 Server version: 5.5.28 MySQL Community Server (GPL) by Remi Copyright (c) 2000, 2012, 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. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | databasename | | mysql | | test | +--------------------+ 8 rows in set (0.01 sec) mysql> 10. [B]How to drop a Database in MySQL server?[/B] To drop a Database in MySQL server, use the following command. You will be asked to confirm press ‘y‘. # [I]mysqladmin -u root -p drop databasename[/I] Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed. Do you really want to drop the 'databasename' database [y/N] y Database "databasename" dropped 11. [B]How to reload/refresh MySQL Privileges?[/B] The reload command tells the server to reload the grant tables. The refresh command flushes all tables and reopens the log files. [I] # mysqladmin -u root -p reload; # mysqladmin -u root -p refresh[/I] 12. [B]How to shutdown MySQL server Safely?[/B] To shutdown MySQL server safely, type the following command. [I]mysqladmin -u root -p shutdown[/I] Enter password: You can also use the following commands to start/stop MySQL server. [I] # /etc/init.d/mysqld stop # /etc/init.d/mysqld start[/I] 13. [B]Some useful MySQL Flush commands[/B] Following are some useful flush commands with their description. flush-hosts: Flush all host information from host cache. flush-tables: Flush all tables. flush-threads: Flush all threads cache. flush-logs: Flush all information logs. flush-privileges: Reload the grant tables (same as reload). flush-status: Clear status variables. # [I]mysqladmin -u root -p flush-hosts # mysqladmin -u root -p flush-tables # mysqladmin -u root -p flush-threads # mysqladmin -u root -p flush-logs # mysqladmin -u root -p flush-privileges # mysqladmin -u root -p flush-status[/I] 14. [B]How to kill Sleeping MySQL Client Process?[/B] Use the following command to identify sleeping MySQL client process. #[I] mysqladmin -u root -p processlist[/I] Enter password: +----+------+-----------+----+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------+----+---------+------+-------+------------------+ | 5 | root | localhost | | Sleep | 14 | | | | 8 | root | localhost | | Query | 0 | | show processlist | +----+------+-----------+----+---------+------+-------+------------------+ Now, run the following command with kill and process ID as shown below. # [I]mysqladmin -u root -p kill 5[/I] Enter password: +----+------+-----------+----+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------+----+---------+------+-------+------------------+ | 12 | root | localhost | | Query | 0 | | show processlist | +----+------+-----------+----+---------+------+-------+------------------+ If you like to kill multiple process, then pass the process ID‘s with comma separated as shown below. #[I] mysqladmin -u root -p kill 5,10[/I] 15.[B] How to run multiple mysqladmin commands together?[/B] If you would like to execute multiple ‘mysqladmin‘ commands together, then the command would be like this. # [I]mysqladmin -u root -p processlist status version [/I] Enter password: +----+------+-----------+----+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------+----+---------+------+-------+------------------+ | 8 | root | localhost | | Query | 0 | | show processlist | +----+------+-----------+----+---------+------+-------+------------------+ Uptime: 3801 Threads: 1 Questions: 15 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.003 mysqladmin Ver 8.42 Distrib 5.5.28, for Linux on i686 Copyright (c) 2000, 2012, 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 5.5.28 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 1 hour 3 min 21 sec Threads: 1 Questions: 15 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.003 16. [B]How to Connect remote mysql server [/B] To connect remote MySQL server, use the -h (host) with IP Address of remote machine. # [I]mysqladmin -h 172.16.25.126 -u root -p[/I] 17. [I]How to execute command on remote MySQL server[/I] Let’s say you would like to see the status of remote MySQL server, then the command would be. # [I]mysqladmin -h 172.16.25.126 -u root -p status[/I] 18. [B]How to start/stop MySQL replication on a slave server? [/B] To start/stop MySQL replication on salve server, use the following commands. # [I]mysqladmin -u root -p start-slave[/I] # [I]mysqladmin -u root -p stop-slave[/I] 19. [B]How to store MySQL server Debug Information to logs?[/B] It tells the server to write debug information about locks in use, used memory and query usage to the MySQL log file including information about event scheduler. # [I]mysqladmin -u root -p debug[/I] Enter password: 20. [B]How to view mysqladmin options and usage[/B] To find out more options and usage of myslqadmin command use the help command as shown below. It will display a list of available options. #[I] mysqladmin --help[/I] We have tried our best to include almost all of ‘mysqladmin‘ commands with their examples in this article, If still, we’ve missed anything, please do let us know via comments and don’t forget to share with your friends. [/QUOTE]
Insert quotes…
Verification
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom