Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mysql-5.5]

MySQL version 5.5 - please also tag with mysql for search purposes.

0
votes
2answers
33 views

Count rows in a table based on a DATE field

I have a table with 3 columns (order_id, client_id, date_added). The content would look something like this: order_id | client_id | date_added ----------------------------------- 14152 | NA4156 ...
0
votes
0answers
16 views

Where and how to set the variables for Percona MySQL Audit Variables

I am trying to set the variable values for Percona MySQL Audit Plugin in my.cnf file before installing the audit plugin on MySQL Server like 'audit_log_rotate_on_size','audit_log_rotations' and '...
0
votes
1answer
18 views

calculate percent change between two entire rows

i have a table of currency data, it's have multiple records in each rows. | Date | ETH | XRP | LTC | USDT | BTC | etc... | |----------------|------|-----|-----|------|------|--------| | ...
0
votes
0answers
9 views

MySql module in xampp server is not starting..Getting following error log:

Error: MySQL shutdown unexpectedly. 3:30:57 PM [mysql] This may be due to a blocked port, missing dependencies, 3:30:57 PM [mysql] improper privileges, a crash, or a shutdown by another ...
0
votes
0answers
21 views

OpenStack MariaDB (MySQL) cleanup of nova database

I am trying to do cleanup on Newton (RHOSP 10) release nova DB, and want to remove old instances, which are removed LONG time ago (have about 7M rows on some tables). I did some info gathering and ...
0
votes
1answer
19 views

using view (necessary) with where conditions (dynamically)

Suppose we have two tables like A {a1, a2, a3 ...} and B{b1, b2, b3 ...} We are using a MySQl view like Select a.a1, b.b1 from A a Left JOIN B b ON a.a2=b.b2 Now our requirement is that we have ...
0
votes
1answer
14 views

MySQL synchronization

I have a cloud-based MySQL instance (slave) and am planning a solution where a remote instance (master) will be based on a ship. The ship will go in and out of international waters and therefore will ...
0
votes
1answer
21 views

How to setup Master to Master Replication with Application auto failover

I have a requirement as follows , need to setup a Multi-Master replication with automatic application failover ,if one master goes down, Can anyone share me some information regarding this. Thanks ...
0
votes
0answers
11 views

How to get single row data into a row with multiple columns [duplicate]

I have a table as follows: Id Movie_name Person_Name Role_Name 1 mov1 xyz Singer 1 mov1 pqr Dancer 1 mov1 abc Actor 2 ...
0
votes
1answer
26 views

Would querying from a partitioned table be faster than from multiple tables with the same table definition?

I have a table that contains about 50 million rows that I have partitioned by 5 million rows per partition. I have manually partitioned it into Table_1, Table_2, Table_3, etc., not using MySql's built-...
0
votes
1answer
20 views

mysql: select join table with latest record for both table

This question has been asked at here as well. i had 2 table, tableA and tableB looking like this: tableA: tableB: i manage to get the latest record by auto increment id by using the following sql ...
1
vote
1answer
23 views

Insert space in MySQL column value

I have a value like "this - is - a -comment". However I need to run an update statement to add a space after the last - (-comment above should be - comment) Any able to help me with an update ...
0
votes
1answer
42 views

How to restore dump from MariaDB 10.1 to MySQL 5.5

I generate backups of my databases by using mysqldump.exe -u root --all-databases > mariaDbBackup.sql. When I try to restore my dump by doing mysql -u root -p < mariaDbBackup.sql, I get an ...
0
votes
1answer
15 views

How can one fetch subtotal in relation to a group by from an outer query?

I have a simple query, where I would like to display for past 7 days, grouped by hour from a table apiRequest: The count of request having a transaction vs the count of those having no transaction. ...
0
votes
0answers
16 views

MySQL: Ignore a Row in a table of a particular Database

I had replication in place between 3 databases, I am trying to ignore a Row in a table of a particular Database. I tried many ways but i couldn't, and also i couldn't find anything in online that ...
0
votes
2answers
16 views

How do I export a multi table database with exceptions?

I am working out of phpmyadmin to export data using an sql. I have an 88 table database. I would like to export all data to a .csv from 85 of those tables where I am only keeping the rows in which my ...
0
votes
1answer
36 views

Converting MySQL 5.5 datetime binary to MySQL 5.6 (math problem)

I received a database "backup" of binary files (.frm and .ibd) that were copied from a MySQL 5.5 install. Unfortunately, I was unable to get these files to import into a MySQL 5.5 vm that I created. ...
0
votes
0answers
4 views

Submit values to mysql data base form a form in side another form together

I have some questions on php. imagine this form <form> <input type="text" name="name"> <form id="second" onsubmit="return false;"> <input type="text" name="name1"> </form&...
0
votes
1answer
22 views

How to transfer data from mysql 5.5.24 to 5.1.36

I've had a server that is not booting up, it had mysql 5.5.24. I was able to copy the whole /data directory. I will be temporarily using an older backup server that has mysql 5.1.36 and cannot be ...
0
votes
1answer
24 views

Do I need to `mysql_upgrade --verbose -u root -p` each time when `source backup.sql`?

I am upgrading mysql 5.1 to mysql 5.5 in centos 7 server. As time limit,I only mysqldump and source several small database to mysql 5.5,and then mysql_upgrade --verbose -u root -p,everything is ok. ...
0
votes
0answers
22 views

MySQL innodb_log_file_size causing problems starting MySQL [duplicate]

I have just restored a backup taken from xtrabackup (only for testing, so not critical luckily), and I am getting the following error: InnoDB: Error: log file ./ib_logfile0 is of different size 0 ...
0
votes
1answer
17 views

mysql 5.5 repartition

With MySQL 5.5, I want to change the partitioning scheme of a very large InnoDB table from "hash" to "range". Can I do it while the table is accepting DML? If not, what is the best-practice work-...
2
votes
0answers
35 views

ranking using find_in_set

Trying to use this method to get the rank position of $associateID. Everything works except FIND_IN_SET. It's not reading alias1 or alias2. Does FIND_IN_SET work with alias's? How can I get this to ...
0
votes
1answer
30 views

Slow query with multiple group by

I have a query to get all the comments from threads where a given user has commented and not yet seen the comment. So if user 1 commented to a topic, then user 2 commented after his comment, then user ...
1
vote
1answer
23 views

Error while restoring the table dump

ERROR 1067 (42000) at line 25: Invalid default value for 'created_on' I'm getting this error while restoring a table after taking the dump(remotely). I have used mysqldump -h (hostname) -u -p (...
0
votes
1answer
46 views

MySQL MONTH Clause: Want to get Month Name instead of number

My query is SELECT MONTH(`hire_date`) AS month FROM `emp_tbl` I'm getting output in Java fx if(resultSet.next()){ int month = resultset.getInt('month'); // output is like 11 } Then I ...
0
votes
1answer
30 views

How to get same column values to make multiple columns?

I don't know if my question is valid or not but I'm working on an attendance system, and I want to get some output for my project. I have an attendance table that holds three columns: emp_id, ...
0
votes
0answers
19 views

MySQL 5.6 and Replication

I'm stuck with one specificity of Replication on MySQL servers. I'm currently working with this configuration : A <--> B ⊦---> C ---> D I explain. I've got a replication Master <-->...
0
votes
1answer
25 views

SQL Query Optimization (Mysql 5.7)

I have following query to execute in live mysql 5.7, which takes around 7 sec and we want to reduce their time, please support SELECT COUNT( DISTINCT InternalInquiry.inquiry_id ) ...
0
votes
1answer
32 views

MySQL Range Optimization and Multipart index

I'm new to the MySQL world. When I read about MySQL Range Optimization some questions were raised related to multipart indices. MySQL 5.7 Doc (http://jorgenloland.blogspot.com/2011/08/mysql-range-...
1
vote
3answers
39 views

Does MariaDB 5.5.56 have INFORMATION_SCHEMA.INNODB_METRICS?

I'm trying to debug why I don't have INFORMATION_SCHEMA.INNODB_METRICS. I'm uncertain because I see it in the MySQL 5.5 reference glossary: https://dev.mysql.com/doc/search/?d=10&p=1&q=...
0
votes
1answer
21 views

Why is this blob saving when used as a concatenated string but not as a prepared statement

I have a PHP mysqli prepared statement that looks like this: $editSQL = "UPDATE tblClientReminders SET Header = ?, Notes = ?, DepartmentID = ?, TierID = ?, RemindType =...
1
vote
1answer
33 views

mysql : ordering a table in the order of the primary key

I have a table with a primary key consisting of two integer columns. I store ~200 millions lines in this table. My program needs to get the full table ordered by the columns of the primary key in the ...
0
votes
1answer
17 views

Should I created a different table to hold a big text / varchar field in MySQL 5.5.61 with Antelope file format?

I read that newer version of MySQL save the big text fields apart from the rest of the row, so we don't have to bother about it. However, how about an older version, specifically MySQL 5.5? Is it ...
1
vote
1answer
16 views

Condition evaluation with NULL or ''

I am having this strange effect from evaluating truthiness of a field IF ( a IS NOT NULL && ((b IS NOT NULL) || (NOT b = '')) && c IS NOT NULL ) THEN set NEW.results = "Passed" ...
0
votes
1answer
28 views

Master slave replication with different mysql version is on both slave and master

Currently, we have MySQL master-slave replication. Both master and slave servers have Mysql 5.5 Currently I need to add one more Master server having version 5.7. Is it possible to add Multiple ...
-1
votes
1answer
50 views

Is mysql using some kind of auto repair due to “check table” warnings?

Today i noticed a "strange" behaviour of MySQL when using "CHECK TABLE" on a crashed table. First i got a warning like "Size of datafile is: * ... Should be: *" but i could still "insert into / select ...
1
vote
1answer
21 views

Table column length is fine in MySQL 5.5 and 5.6, but upgrading to 5.7 results in too many columns

So I have a CMS that is being upgraded from MySQL 5.5 -> 5.7. One table has a 1000+ columns, but it works fine in 5.5 and 5.6. When reaching 5.7, queries involving this table result in a 1117 error. (...
0
votes
1answer
36 views

Remove Characters & Sum Numeric Values

I am using mysql 5.6 and want to remove all characters from json output of db column and after that required sum of numeric values Input: {"across_back":"0","bustd":"0","waiscvvt":"50","hisdp":"50"...
0
votes
1answer
35 views

MySQL, would like to get both a field and a count inside GROUP_CONCAT

I can get a list of statuses that a tracking ticket has had, as well as the id of those statuses, as follows: SELECT t.id, t.name, GROUP_CONCAT( CONCAT(s.id, ':', s.name) ORDER BY s.id) AS ...
0
votes
1answer
41 views

MySQL replication much slower on MySQL 5.7 compared to MySQL 5.5

I have two databases setup for testing (so no live data or connections). The first is a MySQL 5.5.57 Database acting as the master. The second is a MySQL 5.7.23 Database acting as a slave. It is ...
0
votes
1answer
39 views

Does the row locking on slave database also apply to master database?

In a transaction, for example, START TRANSACTION; SELECT count(*) as count FROM `order` WHERE user_id = 25286 LOCK IN SHARE MODE; INSERT INTO `order` (`id`, `user_id`, `product_id`) VALUES (NULL, '...
1
vote
1answer
75 views

Information_Schema.Tables reports different result in MySQL 5.5 and MySQL 5.7

I have started testing some MySQL 5.7 databases to replace our ageing 5.5 Databases, and there seems to be a significant change in the way the information_schema.tables Table records the data size. I ...
1
vote
0answers
31 views

Allocate each value, considering what would be inserted

I'm stuck in a challenge where maybe you can help me. This is what my data sets for the tables look like: entities Object Payment Invoice InvoiceItem Payoff Object has N payments Invoice has ...
0
votes
1answer
130 views

Selecting data from multiple rows into a single row multiple columns [duplicate]

I have a table that has columns like following. Batch number is a database design thing like row number dm_id type_in_id type_student_id amount 36 1 1 ...
2
votes
1answer
75 views

MySQL Replication Stops, But Still Says it is Running

I've got a strange replication problem. For reference I am using MySQL 5.5 with Statement Based Replication. We have a Master with Slaves on site A / network A, and slaves on site B / network B. ...
0
votes
1answer
105 views

in MySQL what is the query to show these student's that each marks less than 50?

I have this table marks in MySQL database I used a query to output this table that shown as below: it's my output: I want use a query to show these student's that each marks less than 50, output ...
2
votes
5answers
57 views

How can I make CASE WHEN query faster?

I have the following query which takes around 20 seconds to return data: select landing_page, SUM(CASE WHEN profile_id=77 and month(dates)='8' and year(dates)='2018' THEN ...
0
votes
1answer
816 views

In PHP MySQL how to sum or not sum multiple columns?

I have three tables this is my codes: <table border='1'> <tr> <th>Subject</th> <th>Mark1</th> <th>Mark2</th> &...