Questions tagged [mysql-5]
Generic MySQL version 5 tag. Please use a mysql-5.x tag instead. Also tag with mysql for search purposes.
178 questions
1
vote
2
answers
107
views
MySQL with subquery becomes slow
I have 3 MySQL tables: products, orders and users.
I want to show all ordered products where not all products are "pre-orders" or "discounts". Note: one user can have multiple ...
3
votes
1
answer
132
views
Structure of my database design?
I've been developing a C# Bus System app using SQL, and I need some advice. I don't know if asking on here is the right thing to do, but I essentially need someone to analyse the .SQL file I have, ...
-1
votes
1
answer
1k
views
Mysql Select all Rows after nth Position
I wish to fetch all rows from table after the nth Position as i given offset value
my table like
id | Value
1 | A |
2 | B |
3 | C |
4 | D |
5 | E |
...
N | R |
I wants the 3rd row Data to Nth ...
2
votes
3
answers
3k
views
Table Creation Order
I have designed my database model with entities and they have relations along with normalization. Now I want to implement my design in my database engine. Before implementing I am puzzled with the ...
2
votes
0
answers
134
views
Signal handler on mysql connection break
I want to know if there is any signal that I can catch by which I can know that my mysql connection with the server has broken in c programming? I know I can check at query time whether my connection ...
2
votes
1
answer
7k
views
MySQL Master 5.5 - Slave 5.6 - unknown system variable 'binlog_checksum', Error_code: 1193
I see the below warning on the my slave server:
2016-11-18 22:48:03 12808 [Warning] Slave SQL: If a crash happens this configuration does not guarantee that the relay log info will be consistent, ...
7
votes
2
answers
4k
views
Will a mysql db import be interrupted if my ssh session times out?
I have a large-ish (several GB) mysql DB that I'm planning to import via
mysql -u root -p mydb < mydb.sql
in a SSH session.
What would happen if my SSH connection drops?
Is it safer to run ...
6
votes
3
answers
11k
views
MySQL secure random string generator
I am looking to generate a cryptographically secure string for password reset in MySQL. I know I could do this at the application level in PHP; but that requires the OpenSSL extension which many of my ...
3
votes
3
answers
13k
views
Computed/Generated columns in MySQL 5
How do I create a table with a formula column in MySQL version 5?
For example: I have a table named Product, which has 5 columns:
id int,
amount int,
sold_out int,
faulty int,
remain_amount is (...
5
votes
1
answer
2k
views
MySQL v5.1.73 - can the binlog_format betweem Master & slave be different?
We are in the process of testing MySQL replication before using it in production. The MySQL is being setup by Puppet in our case and I noticed that the binlog_format setting is different between ...
0
votes
1
answer
8k
views
Exclude entries from SELECT COUNT
I'm new to MySQL and I have a problem with one task.
I have a table like this:
+------------+------------+-------------+
| code | name | location |
+------------+------------+----------...
1
vote
2
answers
13k
views
Table Design for Student Attendance hourly for each day
I have created a table (attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly (1-8hrs) every day. I have the student details in separate ...
0
votes
1
answer
640
views
MySQL UTF-8 Encoding Problem
I have two MySQL databases that are for Wordpress websites. One db is for a live version of a site, the second is a copy of the original that is used in conjunction with a copy of the original site. ...
0
votes
1
answer
131
views
Trying to avoid bad MySQL database design - can't figure out how to avoid too many columns
I am pretty much a beginner having only created a few small php web applications relying on a MySQL database. I am now working on a somewhat larger project. I am in the planning stages of setting up ...
2
votes
2
answers
895
views
SELECT WHERE CASE
I have the following table (MySQL):
--------------------------------------------------------
| id |product_id| store_id | stock_id | priority |
--------------------------------------------------...