MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
2answers
16 views

Modeling invoices and orders

I have a problem in modeling a database that contains orders and invoices. Actually it's more of a problem from a business point of view, but it's related to modeling the database nonetheless. Model ...
2
votes
0answers
13 views

Modeling discounts - Product specific and Customer specific discounts

I have a reasonably simple database but have the following problem: I'm modeling a store + a lot of non-relevant stuff database. I have the following problem. I want to allow for specific products to ...
2
votes
1answer
14 views

automatically change value on the table mysql

i have table invoice in my database that contain atributes 'due date', 'date' and 'status'. What i want is data on 'status' change automatically. Example, status (unpaid change to expired) when date ...
1
vote
2answers
12 views

Any ideas on how to parallelize mysql_upgrade?

I am migrating from 5.5 to 5.6 and would like to speed up the mysql_upgrade process. I have thousands of databases per machine and 200 tables (innodb) per db. Any suggestion how to speed up the ...
1
vote
0answers
12 views

Mysql high cpu usage - cpanel

After an update from whm, I see a high CPU usage from MySQL (5.6). my.cfg: [mysqld] slow_query_log=1 slow_query_log_file="/var/lib/mysql/slow-query.log" long_query_time=1 skip_name_resolve ...
1
vote
2answers
10 views

Mysql user accesable with out password from the host machine but not from the remote machine

I have setup mysql and created a user 'test' and have given a password for it. Strange thing I observed is, for test user I am able to access with out password from the machine I have installed mysql ...
2
votes
1answer
24 views

Is there any difference between 'LIMIT 0, 1' and 'LIMIT 1'?

I recently stumbled upon example codes, which differed by these notations. SELECT * FROM table LIMIT 0, 1 SELECT * FROM table LIMIT 1 The first argument should be considered as the offset if I'm ...
0
votes
0answers
13 views

nbsp character might not be passing as nbsp to the MySQL backend

I am following a tutorial where a web application written in PHP, blacklists spaces from the input(The 'id' parameter). The task is to add other characters, which essentially bypasses this blacklist, ...
1
vote
1answer
81 views

Does PostgreSQL support online schema modification (DDL)?

Recent versions of MySQL (using InnoDB) support many alter table queries without exclusive locking the table. Does PostgreSQL support this to any level? That is, can I add/drop columns from a table ...
-2
votes
0answers
15 views

performance of dml statements in mysql [on hold]

how can we increase the performance of insert and update statements in mysql procedure. and also if a procedure has only updates statements Blockquote ...
1
vote
1answer
13 views

Database design, many rows or many columns?

I am aware that this has been discussed before, but I've read conflicting information about this particular topic, so I'm hoping for a bit more decisive opinions from you. I have multiple tables, ...
1
vote
1answer
33 views

Update records from one table to another in different databases where condition is accomplish

I have two tables stored in two differents DBs and I need to perform some sync between both tables based on lastmodifieddate and lastSyncAt. Let's call them as db1 and db2. This is the DDL schema for ...
1
vote
0answers
20 views

Migrating Oracle 9i database to MySql database on a different Windows Server

I need to migrate my Oracle 9i database with all its tables from windows server 2003 to MySql on another Windows Server 2012. The oracle database is connected to Visual Studio web project. I have ...
1
vote
2answers
31 views

Need simple MySQL query for below description

I have a table with [1...n] columns. I want to retrieve first 3 column names of that table not the records. Should be something like this: Select column_name(3) from table_name="sample";
2
votes
1answer
62 views

Configuration required for a big mysql database around 20GB

I need to host a single machine database (constraints), wherein the database size is roughly 20gb. Most of the tables are in MyISAM. Any way I can actually run it with decent speed ? Alternatives I ...
0
votes
1answer
24 views

RDS Replication Error (Apply Error 1406 / Truncation)

I have a MySQL RDS instance as a master, created a Read Replica from it, and ran some schema change operations on it. To be specific, I changed the charset and collation of all the tables and columns ...
1
vote
1answer
61 views

two similar queries with different results (one very slow)

Two almost identical queries, but one is extremely slow. All tables are innodb. Explain statements attached, but I don't know how to resolve it. userHits (table structure) -id - int - primary ...
1
vote
1answer
27 views

MySQL: OPTIMIZE TABLE vs. myisamchk

I have a very large table (~50GB) and periodically rows are purged from it and I want to run OPTIMIZE TABLE to recover the space. But I do not have enough space to run it. If I do run it the server ...
1
vote
1answer
28 views

How to write marker messages into the MySQL general_log?

I'm build a performance testing harness for our distributed web app. I'm using JMeter to drive it by simulating poorly performing parts of the app from the web side. I've set up MySQL to log to the ...
1
vote
1answer
34 views

mysql replication and innodb_file_per_table

Is it possible for the master (5.1) to have innodb_file_per_table = 0 and for the slave (5.1 or 5.5) to have innodb_file_per_table = 1 ?
1
vote
0answers
38 views

Can I create a trigger in mysql and update the same to oracle database? [on hold]

I am trying to replicate data from mysql to oracle db. Is that possible by creating triggers in mysql?
4
votes
4answers
660 views

SQL query to find player with maximum runs

I have the following tables with me : Table 1 Title : Runs +------------+---------+ | P_ID | Runs | +------------+---------+ ...
3
votes
1answer
51 views

How can I get the last inserted id from an specific table from a given stored procedure?

I know about the existence of LAST_INSERT_ID() function... Though I am not quite sure about its behaviour... Does it take the last inserted id from the current user into account? Or uses all the ...
1
vote
3answers
73 views

Multi-table optimal database design

I'm a bit new to the database design. Thus this question to people who may have more experience. I need to design a database that needs to store statistical data for many systems. The data is ...
1
vote
2answers
24 views

Select data where column value exists in seperate rows for same reference id

This is on a MySQL database. Locations have services. What I want is to get all results where service_id is 2 AND 3, not OR so using IN is out I believe. Database ---------------------------- | ...
0
votes
1answer
29 views

How to test mysql for changes

I'm OCD person, I think I accidentally dropped something in my mysql. Problem is I've around 50 databases, and I cannot manually check everything :( Is there a way to check for these kind of ...
1
vote
2answers
24 views

Error: This version of MariaDB doesn't yet support 'multiple triggers with the same action time and event for one table

I'm trying to run this query in mysql Ver 15.1 Distrib 5.5.44-MariaDB, for Linux (x86_64) using readline 5.1 but got this error all the time: CREATE TRIGGER trig_companies_table_insert BEFORE INSERT ...
0
votes
0answers
21 views

vtiger: can't login with newly created user [on hold]

When I create a new user in the 'Manage users' users section, and after trying to login with his details I get the following in log: Tue Jun 30 16:05:04 2015,666 [8555] INFO VT - PearDatabase ...
1
vote
1answer
38 views

Why does MySQLTuner only see 4Gb of RAM?

I ran MySQLTuner to verify the configuration of a MySQL database, and it reported this problem: [!!] Maximum possible memory usage: 40.9G (1022% of installed RAM) These figures come from computing ...
0
votes
1answer
29 views

What are the dangers of not gracefully shutting down mysql server

What are the dangers of not shutting down a windows MySql server gracefully (i.e. hitting the reset switch on the server as apposed to shutting the OS down) ?
0
votes
1answer
19 views

How to Upgrade Master Slave MySQL on AWS RDS?

I already have Master Slave configuration on AWS RDS. We want to upgrade 5.5 to 5.6.23. ..What should be correct sequence to Upgrade ? 1. Upgrade Master ( Using Modify Instance ) --> Upgrade Slave 2. ...
0
votes
1answer
16 views

Preserving create_time when loading a mysqldump file [duplicate]

I want to make a copy of a MySQL database but preserve the information_schema.create_time for each of the tables. I haven't been able to find an option to do that with mysqldump.
1
vote
2answers
38 views

Disable Primary Key on MyISAM Table

I wanted to speed up a large insert bulk by disabling keys. So I ran the following command on a MyISAM table: alter table my_table disable keys; When I execute show index from answer_2011, I see a ...
3
votes
2answers
148 views

INSERT data on MySQL to specific position based on its value (similar to ORDER BY)

I have a MySQL table with 3 columns for simplicity sake: Datename |Date |Name -------------+--------+----- 30/06/15test |30/06/15|test 30/06/15other|30/06/15|other Note: Column Datename is ...
0
votes
1answer
16 views

Old Data on SFTP [on hold]

There are several old files on an sftp of mine that date back to two years ago. These files are ingested into a MySQL database. I am wondering what to do with the old raw files. The reason I am asking ...
-2
votes
1answer
28 views

How to become MySQL trainer? [on hold]

I'm a certified MySQL developer and I have over a decade of SQL experience, most of it MySQL. What are the steps to take to became a MySQL trainer? Edited to add: Sample questions that made me ...
0
votes
0answers
16 views

Computing View Table based on rows of other tables [duplicate]

I want to compute a specific view, but I think it will be more clear if I show an example: Given this one view: | Group | User | Type | Quantity | |-------|------|------|----------| | 1 | 13 | ...
1
vote
1answer
54 views

mysql query choosing an incorrect execution plan

I have a primary with an dependant subquery as a where condition that is choosing a wrong execution plan, and therefore is running for ever. Main query: SELECT rtr.id AS id156_, ...
1
vote
0answers
65 views

Problem I need to Insert Data every 5 minutes, not working [migrated]

Sorry for being such a Nubb This script is to insert Meteorological data from a weather station. The data comes from this text file online http://www.ndbc.noaa.gov/data/realtime2/IMGP4.txt The ...
0
votes
2answers
31 views

Performance impact of adding a foreign key to a 1M rows table

I have an ecommerce database running MariaDB + InnoDB, which has a table to store the transactions (T) and another which stores quotes (Q). I'd like to make a connection between T and Q by adding a ...
3
votes
1answer
75 views

MySQL: UNION query to get a line for each date

Table1 DATE SKU QTY 2015-06-20 ABCD 3 2015-06-20 ABCD 1 2015-06-21 ABCD 5 2015-06-23 ABCD 2 2015-06-20 EFGH 1 2015-06-21 EFGH 3 Table2 DATE ...
0
votes
1answer
31 views

No connection could be made because the target machine actively refused it. MYSQL work bench?

I have created php and Mysql site.Its Working Locally Xampp well. Finally I moved My site to server..i have Used Mysql Workbench. connected client database in Mysql Workbench in My system.when I Run ...
3
votes
1answer
146 views

Indexes on Slave

I already have a my system with Master-Slave replication. I have started using Slave for data fetching. So, I need to create some extra indexes on Slave.[Not In master - however be informed that the ...
3
votes
1answer
68 views

MySQL 5.5 to RDS 5.6 Replication Error

I am facing following error and unable to fix it. So far I have disabled binlog checksum on the RDS. [Warning] Slave I/O: Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum ...
3
votes
2answers
23 views

Is it possible to backup stored routines and functions with Innobackupex?

I am running a few restore tests on my Dev and I've noticed that the stored routines are not being restored with the innobackupx. Is that something achievable ? Am I doing something wrong ? I am only ...
3
votes
3answers
154 views

INSERT/UPDATE in same query from previous SELECT with some singularities

I'm trying to perform a INSERT|UPDATE by selecting data from another DB and this is what I have so far: INSERT INTO pdone.reps (veeva_rep_id,display_name,username,`first`,`last`,email) SELECT ...
0
votes
0answers
22 views

Syntax error when creating SCHEMABINDING view

I am trying to implement full text search in laravel 4, with mysql database. To implement full text search I need to create indexed view. When I am trying to create view with schemabinding i am ...
0
votes
2answers
26 views

MySQL Add/Grant user if it does not exist

I am trying to create a update/install script that adds a user and database only if it's a fresh install. The script uses a randomly generated password for the user, so using the GRANT statement as ...
0
votes
1answer
15 views

MySQL RDS Error 1062

Normally we can skip 1062 duplicate error but in rds can we skip multiple 1062 errors in one go. For example we define slave skip error =1062 in my.cnf and restart slave. but in RDS MYSQL how can we ...
2
votes
1answer
19 views

DB Schema for Timesheet

Hi I want to create a web based resource tracking system which will be used by my manager using php and html. The db i am using is MySql. I have already created tables for employee, project etc. I ...