MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
13 views

How to sort new data for display?

I am new to SQL. I have a table called Categories with 3 columns: id int(25) category varchar(25) subcategory varchar(25) I would like to add a new subcategory "Real Estate Agency" in the category ...
0
votes
1answer
6 views

What is happening when Seconds_Behind_Master oscillates between two very different sets ov values?

I have a Percona 5.6 slave, newly set up, that is replicating from a server that is itself a slave to a third. The middle server (dbS2, the master for dbS3) is currently ~260000 seconds behind the ...
0
votes
2answers
18 views

Generating a sequence of values

How can I change 2,2,2,1,2 into 201,202,203,101,204 in MySQL? I have a table with data in the format of: +---+---+---+ | U | C | R | +---+---+---+ | 1 | 2 | 1 | | 1 | 2 | 2 | | 1 | 2 | 3 | | 1 | 1 | ...
0
votes
1answer
13 views

Error 1241 When Calculating Percentages

I am trying to get my percentages to equal 100%. As of right now they far surpass 100%. I need to account for the percentages in two different tables, ua_money_allocation and ua_expenses_by_school. ...
0
votes
0answers
12 views

How can I associate different not done continuation blocks with two cursors in the same scope?

If I have two cursors declared in the same block, how can I associate different not done continuation handler actions that are independent of one another and only execute with the cursor they're ...
2
votes
1answer
20 views

How to write a query that counts rows by date?

I have a database named emp1. There is a table named tx_feeder. I want to get the count of rows from that table. I have used the following query to get the data of single day, select count (*) ...
0
votes
1answer
8 views

mysqlbinlog: unknown variable ssl_key or ssl_cert or ssl_ca

I am trying to recover binlog from a remote server using mysqlbinlog client program, however it appears that mysqlbinlog doesn't recognize the SSL options that's required to establish SSL connect to ...
1
vote
0answers
16 views

How do you output field changes in mysql the most efficiently?

I have a rather large employee feed coming in and each employee has about 50 fields. I take the employee data and add on a bunch of other stuff and this gets outputted to one of our vendors. Most ...
1
vote
0answers
11 views

Select records where difference between datetime column1 and column 2 is greater than X amount of time

As the title indicates, I'm trying to return records where the datetime difference between two datetime columns is greater than X amount of time. I'm having trouble wrapping my head around this ...
2
votes
1answer
21 views

Recover mysql using data folder

One of our MySQL servers died but somehow we were able to recover all the files from it. This server was a slave at one time however we stopped it being a slave so we could use it for housekeeping ...
1
vote
1answer
11 views

Innobackupex: How to extract individual files from xbstream compressed backups

We are scripting a mix of full and incremental backup setup for our prodcut backend with sunday triggering full backup and incremental backup on all the remaining days. In this process, we should be ...
-2
votes
0answers
42 views

How to use multiple conditions using AND and OR in WHERE statement? [on hold]

how can I apply a multiple conditions in my WHERE clause using AND and OR? What is the best way to apply this? My scenario looks something like this. ...
1
vote
1answer
36 views

Is my shopping list database schema good enough?

So Im wondering if my schema is correct? It's basically suppose to hold shopping list items for each user, a user belongs to a household. Items will be added to the household. The stocklist is ...
1
vote
1answer
32 views

MySQL Query with good execution plan is very slow due to Sending data operation

I have the following query: SELECT a.borrowerId AS borrower_id, a.created, NULL AS initiator_team_id, NULL AS initiator_user_id, NULL AS old_team_id, NULL AS old_user_id, ...
2
votes
1answer
21 views

Plotting graphs for MYSQL

I was executing following command mysqladmin ext -i1 -c3600 It produces valuable output but I want to use the output to plot graphs so that I can visualize inserts, updates, buffer and other stuff. ...
0
votes
0answers
15 views

MariaDB multi-master replication (star topology) - Bizarre out-of-sync behavior

This may look familiar, I've been learning about this stuff for a few days - but this is a new question. I have a setup like this: Every node is a master, and I have them all replicating to each ...
0
votes
1answer
35 views

MySQL: is it more efficient to query for duplicate row or insert(update) on duplicate?

Just curious on resource efficiency. If I have a list of inserts that need to be accomplished repeatedly which may contain duplicates (there is no way around this, the API I have to work with sucks), ...
1
vote
2answers
19 views

MYSQL find if a default value has been set for a table (DateTime Specifically)

I am trying to internationalize a database, but there are places where the timestamp that gets set is using NOW() instead of UTC_TIMESTAMP(), and it's using Amazon's RDS with multiple MySQL servers. ...
0
votes
0answers
14 views

Write operations on the RDS Mysql Database becomes Slow during long run load test [on hold]

I'm having serious performance problems with MySQL and the InnoDB engine in long run load test. Even the simplest table makes writing operations.I'm using Amazon RDS m3.xlarge instance for performance ...
1
vote
1answer
28 views

MySQL connectivity error

I have a MySQL database on a Linux server that I am able to access through putty logging into servers terminal. When I try to connect to the MySQL database remotely, I get the error: Lost ...
1
vote
2answers
37 views

HeidiSQL: Import CSV

A few lines of my CSV: "id","date","date_","pow","ene","reac" "ES0134000563024539AM0F","2013-05-02","2013-06-05","62","43","43" "ES0134000573024539AM0F","2013-05-02","2013-06-05","62","43","43" ...
4
votes
0answers
48 views

MySQL Commited data not seen to select query

Context: The framework used is Spring and all queries are run with JdbcTemplate. Mysql Server version is 5.6.19. The table is an InnoDB table and defaults like auto commit and isolation level ...
0
votes
2answers
33 views

Mac OS X 10.10 mySQL 5.6.26 accessible from CLI but not port 3306

I did a fresh install of mySQL 5.6.26 on my Mac today. I was able to access mySQL from Terminal.app as expected, however I could not get mySQL workbench to attach to 127.0.0.1 port 3306. What really ...
1
vote
1answer
51 views

Tuning MySQL query from explain

I am working on a search query in MySQL. I am getting this from explain: Original screenshot These are my indexes: Table definition: Original screenshot Query: SELECT `t`.`id` AS ...
2
votes
1answer
27 views

MySQL server won't start with foreign_key_checks=0

I'm running Ubuntu with MySQL version 5.5.44 mysqld Ver 5.5.44-0ubuntu0.14.10.1 for debian-linux-gnu on x86_64 ((Ubuntu)) I have a DB with foreign keys. I would like to have the foreign key ...
1
vote
0answers
20 views

Demoting a MySQL Master to Slave [on hold]

I recently had to fail my master over and promote a slave due to a network outage. All of that worked fine. Now that the network is back, I'd like to add my old master as a slave of the new master. ...
1
vote
1answer
24 views

Migrating all MySQL databases from from one server another. Getting error during import

I create a mysqldump on all the databases on the source server with this command: mysqldump -h mysql-01 -u root -p --all-databases > newdump.sql This takes about an hour, but runs fine. Now, ...
0
votes
0answers
20 views

How can I get the latest value per unique ID, then count the number of entries with that value? [on hold]

Ok, so I have a table that has device_id, lots of other stuff, and network_type. I currently run the following query: SELECT partner_name, COUNT( IF( network_type='ethernet',network_type,null )) AS ...
0
votes
1answer
23 views

inner join on true

My table: abc +--------+ | letter | +--------+ | a | | b | +--------+ Query: SELECT * FROM abc t1 INNER JOIN abc t2 ON true Result: +--------+--------+ | letter | letter | ...
0
votes
1answer
9 views

MySQL / DRBD / Pacemaker on EC2

I am trying to setup DRBD/MySQL/Corosync/Pacemaker on AWS EC2 instances, though I am not sure if it will work since how to integrate VIP is a problem for me. Anyone have any thoughts on what to do ? ...
-4
votes
0answers
22 views

what is update cascading exactly in sql? [on hold]

We have three table declarations for P1(A), Q1(B) and R1(C) with referential integrity in SQL. create table P1 (A primary key); create table Q1 (B primary key references P1(A) on update ...
2
votes
2answers
18 views

Should the Redo log on a production MySQL server be configured to another location?

Concerning the innoDB storage engine, should the innodb_log_group_home_dir option (The directory path to the InnoDB log files) be configured to another disk, other than the default directory, in order ...
3
votes
2answers
27 views

MySQL Multi-Master Replication Topology

Disclaimer: I've never worked with replication before, but I'm doing all my research. Not really having a bunch of in-depth knowledge about MySQL makes a lot of the documentation hard to understand. ...
1
vote
1answer
25 views

MySQL Matching records across tables discrepancies

I have a database called match, within this database I have a number of tables. Of which in particular I need to marry up two datasets in different tables to identify email addresses that are not ...
2
votes
0answers
219 views

How to encrypt user passwords for forum registrations? [migrated]

What is the most secure way to encrypt user passwords for phpBB or MyBB forum registrations? I don't want anyone to be able to access the user passwords, not even those who administrate the MySQL ...
-1
votes
0answers
37 views

Is there any future scope with DBA profile? [on hold]

I have appointed as DBA. And I don't have any kind of experience. Right now I am fresher and I don't have any idea about How is DBA profile ? What should I do to become a good DBA ? Is there any ...
0
votes
1answer
25 views

Using GROUPing or ROLLUP rather than SUMing every column

I am currently looking for a way to achieve what this query is doing without using SUM for every column and, if possible, GROUPing or using ROLLUP or something similar. This query gives me a total ...
1
vote
1answer
36 views

Which technology to synchronise SQL Server and MySQL data?

Which technology should be used if I want to move my data from SQL Server to MySQL server when data is entered to SQL Server row by row and getting feedback from MySQL server? Should it be 1. ...
0
votes
0answers
19 views

Issues in enabling binary logging

I am using MySQL 5.5 RHEL 6 I have made these changes in my.cnf file. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent ...
0
votes
1answer
28 views

Find and Replace text in all table using mysql query

I have a database with name test having two tables sample1(name, quote) sample2(name, quote) I need a replace function or procedure that does the following Find columns with String data type ...
0
votes
2answers
18 views

Config file location in MySQL

I have MySQL 5.5 running in RHEL. I have checked for my.cnf file in my filesystem and its available in two destinations. One in the user's home directory and the other is in /data/etc_ORIG directory. ...
1
vote
1answer
17 views

A view to show worked time per task per user?

I have written this fiddle CREATE TABLE task (`taskid` int, `description` varchar(255), PRIMARY KEY (`taskid`)) ; INSERT INTO task (`taskid`, `description`) VALUES (1, 'Platform for ...
1
vote
0answers
21 views

Single Redshift table vs several mysql/ pgsql (on RDS) tables for small (200 tables * 20 columns * 1 million) monthly aggregation data

We're providing SaaS Data Analytics Dashboard for around 200 clients. We're using Amazon Redshift for storing data in in around 5 tables. We're getting around 30 million hits per day. Currently our ...
0
votes
0answers
8 views

Java error: The url cannot be null ( netbeans and wampserver) [migrated]

I'm creating a java application (stock management) with Netbeans and Wampserver, I create the stock_db_connection class and the Login class, and I want to test if it's work or not, when I click run ...
0
votes
2answers
30 views

Multiple types of parts with multiple types of information (unspecified amount) [duplicate]

I'm having trouble designing a database for a project I was working on recently. It's to do with a garage management system. So I've realised I need to store multiple types of parts (Tyres, engines, ...
0
votes
0answers
30 views

Correction of a complex query [on hold]

I don't know if this question is appropriate on this forum. I have a huge query : SELECT threshold.id, brand.id, COUNT(brand.id), threshold FROM current_stock, article, product, brand, delivery, ...
0
votes
1answer
37 views

Lock wait timeout exceeded; try restarting transaction in NDB

I encountered an error while using an opensource product with a mysql cluster. The error stacktrace is shown below. Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting ...
0
votes
1answer
27 views

Use of log_bin_trust_function_creators in MySQL

What is the use of log_bin_trust_function_creators? Also, Is the value of the parameter dynamic? Will it change if I restart my MySQL service?
0
votes
1answer
15 views

Replicate update statement as Insert in Mysql 5.6

I want to replicate all update statement from Master as a Insert at slave end. 1. Is it possible like in SQL Server ? 2 If so , how ? I want to do it because , if any record on master is ...
0
votes
0answers
28 views

Tuning MySQL with InnoDB engine for my application

I've read through a lot of answers, and I realize this is mostly application specific, so I wanted to give some background as to what I'm doing with the database and hopefully get some tips on tuning ...