Escolar Documentos
Profissional Documentos
Cultura Documentos
Enterpassword:
mysqldisalive
Enterpassword:
mysqladminVer8.42Distrib5.5.28,forLinuxoni686
Copyright(c)2000,2012,Oracleand/oritsaffiliates.All
rightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/or
its
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Serverversion5.5.28
Protocolversion10
ConnectionLocalhostviaUNIXsocket
UNIXsocket/var/lib/mysql/mysql.sock
Uptime:7days14min45sec
Threads:2Questions:36002Slowqueries:0Opens:15Flush
tables:1Opentables:8Queriespersecondavg:0.059
Enterpassword:
Uptime:606704Threads:2Questions:36003Slowqueries:0
Opens:15Flushtables:1Opentables:8Queriespersecond
avg:0.059
Enterpassword:
+++
|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|
+++
Enterpassword:
+
++
|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|
+
++
will
display
all
the
running
process
#mysqladminurootpprocesslist
Enterpassword:
++++++
+++
|Id|User|Host|db|Command|Time
|State|Info|
++++++
+++
|18001|rsyslog|localhost:38307|rsyslog|Sleep|5590
|||
|18020|root|localhost||Query|0
||showprocesslist|
++++++
+++
Enterpassword:
#mysqlurootp
Enterpassword:
WelcometotheMySQLmonitor.Commandsendwith;or\g.
YourMySQLconnectionidis18027
Serverversion:5.5.28MySQLCommunityServer(GPL)byRemi
Copyright(c)2000,2012,Oracleand/oritsaffiliates.All
rightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/or
its
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Type'help;'or'\h'forhelp.Type'\c'toclearthecurrent
inputstatement.
mysql>showdatabases;
++
|Database|
++
|information_schema|
|databasename|
|mysql|
|test|
++
8rowsinset(0.01sec)
mysql>
Enterpassword:
Droppingthedatabaseispotentiallyaverybadthingtodo.
Anydatastoredinthedatabasewillbedestroyed.
Doyoureallywanttodropthe'databasename'database[y/N]y
Database"databasename"dropped
Enterpassword:
You can also use the following commands to start/stop MySQL server.
#/etc/init.d/mysqldstop
#/etc/init.d/mysqldstart
o
o
o
o
o
#mysqladminurootpflushhosts
#mysqladminurootpflushtables
#mysqladminurootpflushthreads
#mysqladminurootpflushlogs
#mysqladminurootpflushprivileges
#mysqladminurootpflushstatus
Enterpassword:
+++++++
++
|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.
#mysqladminurootpkill5
Enterpassword:
+++++++
++
|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 IDs with comma
separated as shown below.
#mysqladminurootpkill5,10
Enterpassword:
+++++++
++
|Id|User|Host|db|Command|Time|State|Info
|
+++++++
++
|8|root|localhost||Query|0||show
processlist|
+++++++
++
Uptime:3801Threads:1Questions:15Slowqueries:0
Opens:15Flushtables:1Opentables:8Queriespersecond
avg:0.003
mysqladminVer8.42Distrib5.5.28,forLinuxoni686
Copyright(c)2000,2012,Oracleand/oritsaffiliates.All
rightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/or
its
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Serverversion5.5.28
Protocolversion10
ConnectionLocalhostviaUNIXsocket
UNIXsocket/var/lib/mysql/mysql.sock
Uptime:1hour3min21sec
Threads:1Questions:15Slowqueries:0Opens:15Flush
tables:1Opentables:8Queriespersecondavg:0.003
Enterpassword: