Gegara alter table, mengubah lebar kolom pada tabel mysql, karena ukuran data lumayan besar jadinya luamaaaa buangeeettt processnya.
Ya sudah akhinya di interrupt saja (cancel) querynya. Caranya gimana?
Berikut stepnya ya...
1. Access
the MySQL Server from the shell prompt using the following command:
mysql -u <user> -h <server> -p <password> Replace
"<user>," "<server>" and "<password>" with the
appropriate credentials.
2.
Execute the command "show processlist;" (without quotes) to see the
threads active for each user or those running under your own account.
3.
Refer to the Time field to determine how long the thread has been
active. Execute the following command to kill the long-running query:
kill <#>; Replace "<#>" with the ID associated with the
applicable thread.
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\PSI011>cd C:\xampp\mysql\bin
C:\xampp\mysql\bin>mysqld
2017-08-11 15:20:11 11764 [Note] mysqld (mysqld 10.1.25-MariaDB) starting as process 9108 ...
C:\xampp\mysql\bin>mysql -u root -h localhost -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 27
Server version: 10.1.25-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show processlist;
+----+------+-----------------+------+---------+------+-------------------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+----+------+-----------------+------+---------+------+-------------------+------------------------------------------------------------------------------------------------------+----------+
| 14 | root | localhost:51560 | dbfp | Query | 3466 | copy to tmp table | ALTER TABLE `t_fplog`
CHANGE COLUMN `status_fp` `status_fp` VARCHAR(50) NOT NULL DEFAULT 'ALPHA' A | 15.542 |
| 27 | root | localhost:53381 | NULL | Query | 0 | init | show processlist | 0.000 |
+----+------+-----------------+------+---------+------+-------------------+------------------------------------------------------------------------------------------------------+----------+
2 rows in set (0.00 sec)
MariaDB [(none)]> kill 14
-> ;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
Komentar
Posting Komentar
Silakan dikomen...