How i export consult in a txt file in the terminal of Linux?

|
ceo_lupeko 2022-01-23 00:31:00
Hi there! I need 1 thousand MySQL tasks. Who knows where I can get those?
Liran 2022-01-23 11:49:18
i need to create a zone table with column id & zone = (center,north,east,west,south) – what do you think the zone’s type should be? this will have only 5 rows with those values
crazy1 2022-01-23 13:40:46
How to kill mysql query in sleeping
crazy1 2022-01-23 13:41:08
Due to query are sleep my database get hangup
crazy1 2022-01-23 13:41:15
How may i able to fix it
crazy1 2022-01-23 13:41:33
Mysql5.7 I’m using
crazy1 2022-01-23 13:42:23
mysql_en-16418.jpg

svart 2022-01-23 16:32:28
crazy1 2022-01-23 13:41:08
Due to query are sleep my database get hangup

it is not true. i’d suggest do not kill them

crazy1 2022-01-23 16:40:11
Then what shall I do
crazy1 2022-01-23 16:40:20
How can I over come from it
crazy1 2022-01-23 16:40:37
It making my site too many connections issue
crazy1 2022-01-23 16:40:55
Even i check waitconnection & time out as well
svart 2022-01-23 19:53:53
Sorry I have no idea what you are talking about. Maybe you can try to explain what kind of issue do you have
SKP 2022-01-23 20:22:24
What is arithmetic operator in SQL

sql arithmetic operators | arithmetic operator in sql | arithmetic operator in sql query | mysql #15YouTube
sql arithmetic operators, arithmetic operator in sql query,arithmetic operator in sql

✅ SQL Tutorial for beginners: https://www.youtube.com/watch?v=UxRkd…

✅ Python Tutorial for beginners: https://www.youtube.com/watch?v=9kl7_…

✅ Pandas Tutorial for beginners: https://www.youtube.com/watch?v=kL0C2…

✅ Text Preprocessing in python: https://www.youtube.com/watch?v=xgy7L…

snehakshaylata 2022-01-23 20:35:17
Anyone using nodejs with mysql
MasterZiv 2022-01-23 21:13:08
crazy1 2022-01-23 13:41:08
Due to query are sleep my database get hangup

Investigate innodb status, look for locks, sleeping sessions can’t hang anything up

MasterZiv 2022-01-23 21:13:44
snehakshaylata 2022-01-23 20:35:17
Anyone using nodejs with mysql

This doesn’t matter what is the client

2022-01-23 23:50:20
Hello i have a problem with mysql
2022-01-23 23:50:50
How i export consult in a txt file in the terminal of Linux?
crazy1 2022-01-24 04:46:44
Could u share me any reference link to cross check
MasterZiv 2022-01-24 08:10:46
Send text of your query, or correct the text yourself.
Hermione_098 2022-01-24 12:46:26
mysql_en-16465.jpg

Hermione_098 2022-01-24 12:47:17
Plz tell
Liran 2022-01-24 13:04:09
CREATE TABLE tb_banners_published_malls(
id int NOT NULL AUTO_INCREMENT,
mall_id int NOT NULL,
banner_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (banner_id) REFERENCES tb_banners(id),
FOREIGN KEY (mall_id) REFERENCES tb_malls(id)
);
why FK are not created??
cris_highlight_bot 2022-01-24 13:04:10
Liran 2022-01-24 13:04:09
CREATE TABLE tb_banners_published_malls(
id int NOT NULL AUTO_INCREMENT,
mall_id int NOT NULL,
banner_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (banner_id) REFERENCES tb_banners(id),
FOREIGN KEY (mall_id) REFERENCES tb_malls(id)
);
why FK are not created??

mysql_en-16468.jpg

MasterZiv 2022-01-24 13:25:09
Liran 2022-01-24 13:04:09
CREATE TABLE tb_banners_published_malls(
id int NOT NULL AUTO_INCREMENT,
mall_id int NOT NULL,
banner_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (banner_id) REFERENCES tb_banners(id),
FOREIGN KEY (mall_id) REFERENCES tb_malls(id)
);
why FK are not created??

Send errors, please

MasterZiv 2022-01-24 13:25:47
Liran 2022-01-24 13:04:09
CREATE TABLE tb_banners_published_malls(
id int NOT NULL AUTO_INCREMENT,
mall_id int NOT NULL,
banner_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (banner_id) REFERENCES tb_banners(id),
FOREIGN KEY (mall_id) REFERENCES tb_malls(id)
);
why FK are not created??

What is your default storage engine?

Liran 2022-01-24 13:29:49
MasterZiv 2022-01-24 13:25:09
Send errors, please

[2022-01-24 12:28:06] [HY000][1215] Cannot add foreign key constraint
[2022-01-24 12:28:06] [HY000][150] Create table ‘smallstage_grouponi_groupon/#sql-1_223’ with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
[2022-01-24 12:28:06] [HY000][1215] Cannot add foreign key constraint

Liran 2022-01-24 13:30:02
innoDB is the default one
Liran 2022-01-24 13:30:23
MasterZiv 2022-01-24 13:25:09
Send errors, please

CREATE TABLE tb_banners_published_malls_test(
id int NOT NULL AUTO_INCREMENT,
mall_id int NOT NULL,
banner_id INT NOT NULL,
PRIMARY KEY (id)
);

ALTER TABLE smallstage_grouponi_groupon.tb_banners_published_malls_test
ADD FOREIGN KEY (mall_id) REFERENCES tb_malls(id);

ALTER TABLE smallstage_grouponi_groupon.tb_banners_published_malls_test
ADD FOREIGN KEY (banner_id) REFERENCES tb_banners(id);

MasterZiv 2022-01-24 13:31:12
Liran 2022-01-24 13:29:49
[2022-01-24 12:28:06] [HY000][1215] Cannot add foreign key constraint
[2022-01-24 12:28:06] [HY000][150] Create table ‘smallstage_grouponi_groupon/#sql-1_223’ with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
[2022-01-24 12:28:06] [HY000][1215] Cannot add foreign key constraint

Foreign key must reference an existing primary key in the parent table

MasterZiv 2022-01-24 13:32:21
Liran 2022-01-24 13:29:49
[2022-01-24 12:28:06] [HY000][1215] Cannot add foreign key constraint
[2022-01-24 12:28:06] [HY000][150] Create table ‘smallstage_grouponi_groupon/#sql-1_223’ with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
[2022-01-24 12:28:06] [HY000][1215] Cannot add foreign key constraint

First, create PKs in all tables, then you can create FKs

Liran 2022-01-24 13:34:57
MasterZiv 2022-01-24 13:32:21
First, create PKs in all tables, then you can create FKs

thats the problem, the tables are already created with PK on the id’s column 😮

MasterZiv 2022-01-24 13:36:34
Liran 2022-01-24 13:34:57
thats the problem, the tables are already created with PK on the id’s column 😮

Obviously, they are not. Otherwise you would have created the foreign key

MasterZiv 2022-01-24 13:37:42
Liran 2022-01-24 13:34:57
thats the problem, the tables are already created with PK on the id’s column 😮

send DDL of those two tables

tb_banners and tb_malls

|