Langsung ke konten utama

Interrupt not responding query process database mysql



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

Postingan populer dari blog ini

CREATE CROSS TAB QUERY IN MYSQL

MySQL Multi-Aggregated Rows in Crosstab Queries MySQL’s crosstabs contain aggregate functions on two or more fields, presented in a tabular format. In a multi-aggregate crosstab query, two different functions can be applied to the same field or the same function can be applied to multiple fields on the same (row or column) axis. Rob Gravelle shows you how to apply two different functions to the same field in order to create grouping levels in the row axis. Today’s topic of discussion is crosstabs, which contain multiple aggregate functions in the row axis of a tabular resultset. Recall from the the  All About the Crosstab Query  article that an aggregate function is one that summarizes a group of related data in some way. Examples of aggregate functions include COUNT, SUM, AVG, MIN, and MAX. In a multi-aggregate crosstab query, two different functions can be applied to the same field or the same function can be applied to two or more fields. Today we’ll create a query...

Mengatasi "This app can’t run on your PC Windows 10"

  Salah satu pesan error yang sering muncul saat aplikasi tidak bisa dibuka di Windows 10 adalah “ This app can’t run on your PC ,   to find a version for your PC check with the software publisher “. Masalah seperti ini cukup umum dan dialami banyak orang, terutama saat menjalankan aplikasi yang bukan dari Microsoft. Penyebab utama terjadinya masalah ini adalah karena masalah kompatibilitas antara aplikasi dengan versi Windows yang dianggap tidak sesuai oleh sistem. Bisa juga karena aplikasi atau game yang akan jalankan tersebut terkena filter oleh Windows sehingga prosesnya diblokir. Windows 10 memiliki fitur untuk memblokir aplikasi tidak dikenal yang berasal dari  unverified developers , fitur ini secara default akan aktif dengan tujuan untuk mencegah masuknya aplikasi yang mengandung malware dan virus. Penyebab lainnya bisa juga karena file aplikasi yang rusak, file sistem yang korup, atau masalah yang disebabkan oleh malware dan virus. Pada kesempatan kali ini  ...

Linux Basic Command Cheat Sheet

 https://www.guru99.com/linux-commands-cheat-sheet.html Linux Command Cheat Sheet In this Linux/Unix command line cheat sheet, you will learn: Basic Linux commands File Permission commands Environment Variables command User management commands of linux Networking command Process command VI Editing Commands Basic Linux commands Command Description ls Lists all files and directories in the present working directory ls -R Lists files in sub-directories as well ls -a Lists hidden files as well ls -al Lists files and directories with detailed information like permissions,size, owner, etc. cd or cd ~ Navigate to HOME directory cd .. Move one level up cd To change to a particular directory cd / Move to the root directory cat > filename Creates a new file cat filename Displays the file content cat file1 file2 > file3 Joins two files (file1, file2) and stores the output in a new file (file3) mv file "new file path" Moves the files to the new location mv filename new_file_name Re...