MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
7 views

Planning on building a big web service. What kind of developers do I need?

I'm a designer. I'm looking for web/mobile developers to help me build a similar platform like Airbnb or Yelp, but I don't know a lot about backend or on what technologies these two sites are built ...
0
votes
1answer
13 views

Count(*) as rolecount, filter by rolecount = 1

How can i filter out the rows who only got rolecount = 1? WHERE rolecount = 1 gives an error. Can't really figure out how to do it. SELECT u.uid AS uid, u.name AS name, u.picture AS picture, ...
1
vote
1answer
13 views

Does it make sense to run a cluster of database servers in docker containers?

I'm currently looking into setting up a database cluster (MySQL Galera or Percona) but I have only 2 machines. However, according to many sources I've read (This article from the Mariadb KB), the ...
0
votes
1answer
8 views

how to store complex data using mysql and jsp

At present i am doing small web application called slam book .We know slam page contains so many fields .By using mysql tables it takes too many columns and leads to complexity for accessing the ...
1
vote
1answer
11 views

mysql 5.6 gtid replication: is log_slave_updates required?

I've read the docs saying log_slave_updates is required. It makes sense for a general promotion situation. But is that really still required for something you're intending to be a read only slave ...
0
votes
0answers
7 views

MySQL Cluster lock wait timeout exceeded when trying to deal with huge amount of queries

I'm trying to deal with many connections and sometime I get following error: ERROR : Lock wait timeout exceeded; try restarting transaction The bigger number of queries the least number of ...
1
vote
1answer
8 views

Generic Trigger on MYSQL to replicate data on other table

I'm currently doing a history table that basically logs every single modification in a history table, and adding the Action executed. CREATE TABLE `competencies` ( `id` int(11) NOT NULL ...
0
votes
1answer
8 views

Strange issue with MySql 5.6 replication

I have a strange issue with MySql 5.6 Master-Master replication. I'm not sure if its entirely a replication issue or a client issue. We have two MySql databases on two different RHEL servers. We have ...
0
votes
1answer
6 views

mysqldbcompare - ERROR: The list of objects differs among database

I'm running: # cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.5 (Santiago) # rpm -q mysql-server mysql-server-5.1.73-3.el6_5.x86_64 # and mysql> SELECT VERSION(); ...
0
votes
0answers
6 views

Connect to a Remote MySQL

I'm trying to connect to a MySQL remote Server but I always get: RROR 2003 (HY000): Can't connect to MySQL server on 'IP' (111 "Connection refused") I follow this rule in the remote server GRANT ...
0
votes
0answers
18 views

Insert results of concat

I have a table with 4 columns: ID ORDER_ID QTY VALUE 1 153 1 0 2 476 1 0 3 453 9 1 4 719 2 2 ...
0
votes
0answers
8 views

MySQL: What are the pros and cons of running with engine=Memory vs on a memory-mapped filesystem?

What is the difference (in terms of read and write perf, alter tables, backup and recoverability and consistency) of running a MySQL database on a memory-mapped filesystem vs with ENGINE=MEMORY
0
votes
0answers
12 views

Why do these two queries (which I think are equivalent) rely on different keys?

We have a query that we don't like, since it ends up doing a full table scan. EXPLAIN SELECT count(*) AS c, location.name FROM study LEFT JOIN location ON study.location_id = location.id ...
1
vote
1answer
11 views

MySQL Join, Force NULL Row

I'm having a bit of trouble figuring out how to do this -- I need to select all rows from table t1, join table t2 -- but include a null row from t2 for each record in t1 (even if rows match in t2). ...
1
vote
1answer
8 views

How to append value of column with double quotes (add quotes around string)

I have a table with a column that is TEXT type. In the column are numeric characters. What I'm trying to achieve is to wrap those characters in double quotes. EXAMPLE: NAME ID QTY Apples ...
0
votes
1answer
28 views

creating a 24 hours data table - Suggestions/improvements

I am planing to have a table to store the data based on every hour , in short I have a file with 24 hour data and I need to use this to populate a hourly bar/line graph. Below is a sample 24hr data ...
0
votes
1answer
34 views

1 million strings and exact match search

I need to chose the best solution (software and algorithm) to solve my problem. I need to store up to million strings and data associated with them. Strings are search queries and data is cached ...
0
votes
1answer
26 views

select where index + other field

Learning indexing I have made an index, consisting of usergroupid and birthdate I understand that queries will then benefit from indexing when searching usergroupid and/or birthdate But what ...
0
votes
1answer
23 views

how to optimize grouped select from an already grouped select query

I already had a specific query to get a number of shops, but I couldn't sum the cost field, I kept on getting an error on the sum function, but it worked when I did this; select tab.shop_id, ...
-1
votes
0answers
30 views

Split in and out for attendance machine system

I am using PHP and MySQL to create an attendance system. I have this table: +----+----+------------+-------+-------+-------+-------+-------+--------+ | id | pd | date | in1 | out1 | in2 | ...
0
votes
0answers
34 views

Nesting multiple INNER JOIN within LEFT OUTER JOIN in sql on deifferent side of keyword

I am having some problems with one of the question's answered in the book "SQL FOR MERE MORTALS". Here is the problem statement Problem Statement Here is the Database Structure The Database ...
1
vote
1answer
16 views

Multi Replications Plan on 2 servers

I need some advice about our new database deployment plan. We have 6GB of total mysql data(all innoDB) and innoDB_buffer_pool is set to be 16GB Ans we have 2 database servers.(plus 1 server for the ...
0
votes
0answers
20 views

Multiple Queries with overlapping results and column level permissions

Sorry for the obtuse Title, I'm having a hard time knowing how to summarize. I'm trying to do this with pure SQL(mySQL) and server-side(Perl) data manipulation. A user table is defined: id, uid, ...
0
votes
1answer
25 views

High Traffic Errors - Unknown Cause

I came into work on Monday morning to find problems all over our shopping cart website. I've tracked the problem down to what I believe is unusually high database traffic – several gigabytes in just ...
0
votes
0answers
19 views

Correct Schema Design for form builder?

I'm attempting to build a form builder app that allows users to: signup build a form store the data from that form into this db. I have designed the following schema: ...
1
vote
2answers
42 views

Determining what query was called

I want to reverse engineer what exactly happens to the MySQL database when a product is added in Magento. I will have to reproduce the query, because I would like to manually enter new records using a ...
1
vote
1answer
39 views

Finding reason behind high write IOPS on MySQL (RDS) server

I am having performance issues with an AWS RDS instance (running MySQL 5.6). This is the backend db to an XMPP server called Tigase. According to Tigase Inc. this type of db instance should be able ...
0
votes
0answers
43 views

Combine two mySQL sum queries into one which use different where clauses

I have two sum quires referencing different tables in mySQL. How can I combine the two in order to calculate the difference between the two values for each user in the database? Query 1: SELECT ...
0
votes
0answers
17 views

How to change the domain name or IP address in mysql database in every tables

I was using Openfire chat server in Ubuntu, whose IP address was 192.168.1.15. Then, I wanted to move it to other ip (192.168.1.55), so i took a backup of my database. The database I was using is ...
0
votes
1answer
27 views

Can a slave with a dynamic ip update the master

How can I setup mySQL replication in such a way that a slave on localhost with dynamic IP can update the master as well as get updates from the master which has a static IP. The slave will not be ...
0
votes
1answer
28 views

How do I fix and prevent corrupted MySQL tables?

We have developed software that uses MySQL. After some months of usage, some of the database tables had been corrupted and need to be repaired. Because of the corruption,we are not able to create a ...
0
votes
1answer
48 views

Is this statement syntactically correct?

$q = "SELECT var1, var2, var3 FROM tablename WHERE var_a = '$var_a' AND var_b = '$var_b' AND ( ( var1 = '$var1' AND var2 = '$var2' ) OR ( var1 = '$var2' AND var2 = '$var1' ) )"; This ...
0
votes
1answer
26 views

How to retrieve stored procedures from raw data

I have all the raw data from a database that I can't access through the mysql program anymore. I was able to get the tables by copying the .frm files over to the new installation of mysql, but I don't ...
0
votes
1answer
19 views

Synchronize part of the tables to use offline (no internet use) then sync back to server

I read some synchronization post but seems not suit my case. As I will sometimes go travelling locally and other country which I may have no access to internet then I could not even get the data in my ...
0
votes
0answers
27 views

Moving datadir OK start, but socket error for mysql client

I'm trying to move my MySQL datadir from /var/lib/mysql over to /home/mysql (an ssd drive as I'm having iowait issues on /var/lib/mysql when MySQL is running on that drive). The OS is CentOS 5.6 ...
1
vote
1answer
30 views

for what My mysql server get mr than 2 gig RAM on my vps?

imnot know english very well so sory for my bad dictation on my vps that has 4 gigabyte RAM and 4 core CPU and 220 gig HDD . i haved installed centos basic server 6.5 x64 and virtualmin last version ...
0
votes
1answer
29 views

MySQL add few column exception for TRIGGER UPDATE FOR EACH ROW

How to effectively add column id, name exception for trigger: CREATE TRIGGER updated BEFORE UPDATE ON table1 FOR EACH ROW SET NEW.date=NOW() so that date=NOW() will be affected on updating any ...
0
votes
0answers
8 views

Logging all user actions

I'm creating a community-driven project and, of course, I want to be protected against spam or evil users. In case of undesirable changes in the DB I would log all users' actions ...
0
votes
2answers
19 views

MySQL get values from the other table by using inner joins

In mysql I have 3 tables called as ps_product_lang ps_order_detail and ps_image here are the tables sample data === ps_product_lang === CREATE TABLE IF NOT EXISTS `ps_product_lang` ( ...
0
votes
0answers
28 views

Result of query not showing in phpmyadmin

I have a 500,000 row database that I am running a reasonably complex query on: SELECT yfog, (SELECT AVG(yds) FROM pbp_yards_gained p2 WHERE p2.yfog=p1.yfog AND type = ...
0
votes
0answers
14 views

Pasting into PHPMyAdmin

This is probably really simple but I have had a look on the web but can't seem to find an answer. I am experimenting with MySQL + PHPMyAdmin on a WAMPserver stack and was saving queries in Excel When ...
1
vote
1answer
68 views

Reducing execution time for this gnarly SQL

I'm creating an order system of some kind. There is a function that I use to get orders (in PHP) and retrieve the required information about the order. However, it seems that I am pulling a lot of ...
0
votes
0answers
16 views

What is safe way to restore mysql database?

When database is online. I want to restore dump file to it. Here is my plan: set global read_only=ON use root with super_priv to drop all databases do restore all databases set global read_only=OFF ...
0
votes
0answers
15 views

How does database connection actually works? [duplicate]

I am wondering, on a practical level : what is a database connection? What does it represent for PHP/Java/Ruby/etc to have an opened connection for instance? What about the MySQL deamon? Does it ...
0
votes
1answer
31 views

How to compare all rows in a table and extract data using triggers

I have two table one table stores the gps data of various users another table stores the idle time of the users based upon the gps data of latitude and longitude values and timestamp difference. ...
0
votes
1answer
29 views

How to sum the buy order and sell order in one row per each ticker

I have a table containing some trading information of several tickers and I would like to divide the data into sum(Amount) for buy and sell separately, grouping by each ticker. I have one table ...
-1
votes
0answers
45 views

How to select record with biggest value of column [migrated]

Columns: numberIWant, value I would like to get numberIWant number of records, which have biggest value. select max(value) from myTable only returns the max value. I want to find numberIWant that ...
1
vote
2answers
29 views

Why is MySQL ignoring my indexes?

I have a query select distinct id from patient where company_id in (1) and (name_last like 'peter%' or name_first like 'peter%' or remote_id like 'peter%') running on a table that looks like this ...
0
votes
3answers
39 views

Select rows where 2 cells not the same

I have the following table: +----+-------+---------+---------------+ | id | owner | variant | EAN | +----+-------+---------+---------------+ | 1 | 101 | black | 1111111111111 | ...
0
votes
0answers
14 views

mysqld: page allocation failure. order:3, mode:0x20

I've been running a mysql server in production for some time, lately the db has been locking up at around 10:30 every day. There's no cron jobs running at that time or anything like that, and I'm at a ...