MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
36 views

MySQL has gone away with two connections

I'm using MySQL 5.6.19 on OSX 10.9.5 (DMG installation from mysql.com) and I'm receiving the infamous MySQL has gone away when I try to open two connections to this server. If I try connecting from ...
0
votes
0answers
21 views

Receiving duplicate results in one condition of JOINED query

I always end up here when Googling for solutions, so I thought I'd cut out the middleman since I'm unable to fix this via searching/forums. It's my first time posting, so please forgive any faux pas ...
1
vote
1answer
10 views

Why MySQL init_connect variable gets updated after rebooting?

After SET GLOBAL init_connect=''; query everything works fine. However after rebooting the server or restarting the MySQL service it updates the init_connect value to some random value (OÇÿOÇÖ). Do I ...
1
vote
1answer
31 views

Impact of using UUIDs with an UNIQUE index vs. PK?

It's well known how the performance of random UUIDs as PKs in an InnoDB table degrades terribly as it increases in size. Would an UNIQUE index for a non-PK UUID column have the same impact? UUIDs are ...
0
votes
1answer
26 views

MySQL: Rank by Department in an employees table

I need Mysql query to rank the hours used by each department in an employees table, but it just ranks all without taking into consideration the departments.
1
vote
2answers
32 views

Lost connection to MySQL server during query issue

SELECT UNIX_TIMESTAMP(a.timestamp) AS timestamp, a.adid, a.adtitle, a.cityid, a.price, a.area, a.addesc, a.subcatid, ct.cityname, p.picfile, scat.subcatname, cat.catid, cat.catname FROM xzclf_ads a ...
0
votes
0answers
53 views

Rows are not getting deleted from MySQL Table

We have one innodb table and one Federated table in our environment and while deleting rows from Federated table it shows 24-rows affected with no warning, but rows are not deleted. There is no ...
0
votes
0answers
18 views

HTML Form: Insert id into related table [migrated]

I'm relatively new to both PHP and MySQL and here's my first question: I have 3 tables. One as the "main table" and two as basically lists/categories of which I can choose and relate them to my main ...
0
votes
1answer
18 views

Query condtion for values not being the default value?

Can I reference a columns default value directly in a query? Something like this: SELECT column FROM table WHERE column <> column.DEFAULT_VALUE Background: I'm writing a application test, and ...
0
votes
1answer
31 views

Where does mysql store data?

Where does mysql store data? I found out (by using mysql>SELECT @@datadir ) that it's in var/lib/mysql - but that can't be it. I have a quite big database (4 GB) called 'bot', but all the files in the ...
1
vote
1answer
24 views

Unexpected empty result [on hold]

select a,b from table1 where a not in (select x as a from table2) AND b not in (select y as b from table3) The above query gives an empty result. Why? And how should I construct this combined ...
1
vote
0answers
15 views

Any way to mitigate the large server load during LOAD DATA LOCAL INFILE operations?

I'm using MySQL LOAD DATA LOCAL INFILE to load csv files, and have noticed that during these loads, server output speed to other users diminishes eg long page download times, logins timeout. The LOAD ...
2
votes
1answer
31 views

1 query using OR operator in where clause vs multiple query equal condition where clause in mysql

case 1: 1 query using OR operator in where clause like select * from users where name='smith' or nick='smith' (using index_merge ) case 2: multiple query equal condition in where clause select * ...
0
votes
0answers
10 views

What is the optimal number of worker tasks to specify in MySQL Workbench for a speedy migration?

What is the optimal number of worker tasks to specify in MySQL Workbench for a speedy migration? The default is 2. The MySQL server is running on the same Windows machine, installed with defaults. ...
0
votes
2answers
18 views

How to check/change MySQL named pipe settings?

I'm having a hard time finding anything on this because I don't know what to call it. But when you install MySQL it asks you if you want to allow connections to the database from other machines or ...
0
votes
0answers
12 views

Recreate partition in mysql

I have a table having datetime column partitioned by RANGE (DAYOFYEAR(datetime_col)) By this I want to drop oldest of 4th week partition data and recreate immediately for next year similar week ...
0
votes
1answer
27 views

Dealing with Mysql Replication and Functions

In MySQL replication Master-Slave, is there anyway to deal with the functions: LOAD_FILE() UUID(), UUID_SHORT() USER() FOUND_ROWS() SYSDATE() GET_LOCK() IS_FREE_LOCK() IS_USED_LOCK() ...
0
votes
1answer
11 views

mysql “can't create test file” error on Centos

When starting mysql on Centos servers with a custom data directory you might get an error similar to the following: 2014-10-15 10:23:56 17081 [Warning] Can't create test file ...
0
votes
0answers
16 views

Data usage increase although remove data in table MySQL Cluster

I try to test my MySQL cluster system. I add data to a table and use command ndb_mgm all report memoryusage. The data usage in data node increases. When I remove all data in the table and use command ...
0
votes
0answers
9 views

Is online schema change possible with MySQL Cluster?

I believe that this is the first question on this community. I'm surveying MySQL Cluster for next project in my workplace. I read a lot official/unofficial pages on the web. But I'm not a native ...
0
votes
0answers
23 views

Mysql sum of column group by question

I have the results of a select that I am joining on that I need to get a slightly complex sum of a column from. I need the sum of result grouped on id PLUS the sum of result of any row where ...
0
votes
1answer
33 views

to pivot or not to pivot - schema design question [closed]

I am implementing something similar to this schema http://www.databaseanswers.org/data_models/event_reservations/index.htm It occurs to me that the pivot table for Customer_Bookings would just keep ...
1
vote
1answer
30 views

Help on MySQL joins

I'm building a system to monitor currency prices. Part of my database structure looks like this: My system is trying to pull the api ticker for each exchange with this query: SELECT distinct ...
0
votes
0answers
31 views

How can I speed up MySQL Workbench in a SQL Server to MySQL conversion? [closed]

I am using MySQL Workbench to convert a 9GB SQL Server database (2012) to MySQL 5.6 on the same AWS Windows machine. (It's an r3.2x large, 8 vCPUn, 26 ECU, 61 GB RAM). It has been running for about ...
0
votes
1answer
17 views

error Error Code : 1054 Unknown column 'v_column' in 'OLD' [closed]

DELIMITER $$; DROP TRIGGER `opendental`.`patientAfterUpdate`$$ create trigger `patientAfterUpdate` BEFORE UPDATE on `patient` for each row BEGIN declare v_column varchar(20); if new.LAST_UPD_SRC ...
1
vote
1answer
22 views

Is there any drawback of MIXED replication mode?

So, recent mysql server allows three types of replication mode: STATEMENT, ROW, MIXED. They all have pros/cons, and I pick the mode according to site characteristics. When I get a replication error I ...
0
votes
2answers
37 views

Merging tables, but ignoring duplicate columns

I have two tables I want to merge: city1(id, city, state, zip, lat, lon, county) city2(id, city, state) The tables contain overlapping city and state, but not primary keys. I can't figure out how ...
0
votes
1answer
23 views

combine results from two columns without union

I have a table with two columns : select his_name , her_name, other_name from foo I want to combine the result set into on row. I can do it with union select her_name as name from foo union all ...
1
vote
2answers
40 views

Using if statement outside of a stored procedure or function

I want to call a query to update a mysql table but my query contains an if statement set @id = 0; set @the_number = 0; set @the_message = 0; set @selected_message = 0; SELECT id, dest_msisdn, ...
-4
votes
1answer
41 views

How to design type table with indefinite multiple items?

I want to design an invoice system. In invoice table there should be an invoice_type, which comes from a table called invoice_type_table. I am confused with the structure of this invoice_type_table. ...
1
vote
1answer
51 views

Normalized Database Diagram

So I am working on my DB design skills, and have tried to create a normalized MySQL database. Here is the diagram: The reason I added the Address table is to break the address fields into separate ...
1
vote
0answers
35 views

triggers vs views [on hold]

I have a mysql database with the following tables Penalties Scores player_instance When penalties is updated/deleted then it will update scores (via a trigger). Also when a player-instance row is ...
0
votes
1answer
31 views

Best datatype to store betting odds? [closed]

I have a lot of soccer betting odds (hundreds per match and thousands of matches), for example: <_10Bet_Home_Home>8.00</_10Bet_Home_Home> ...
0
votes
1answer
18 views

How to combine duplicate parent rows in a relational MySQL table

I have my DB structured like this with people.person_id as the foreign key for each row in people_meta. people table ╔═════╦════════╦═══════╗ ║ id ║ fname ║ lname ║ ╠═════╬════════╬═══════╣ ║ ...
0
votes
1answer
28 views

how to give GLOBAL PRIVILEGES in MySQL?

I need limited Global permission like Select Execute and grant privileges to one user. how can i give, can any one help me.
0
votes
0answers
24 views

SQLDependency equivalent for MySQL [migrated]

I want to implement a real time update on my ASP.net project, so i tried to implement the long poling mechanism and Comet. var isPolling = 0; function longPolling() { isPolling++; $.ajax({ ...
0
votes
2answers
22 views

Should I delete the mysql database user id created for my site by the developer? [closed]

I am a newbie when it comes to anything related to databases. I cut ties with my developer who had set up my site and was hosting it too about six months ago. I moved my site to a new host thinking ...
0
votes
0answers
14 views

MySQL Fabric Error- No module named mysql.fabric.services

I have installed MySQL fabric, but I am getting this error $mysqlfabric Traceback (most recent call last): File "/usr/bin/mysqlfabric", line 27, in <module> from mysql.fabric.services ...
1
vote
0answers
50 views

MySQL keeps inserting new rows automatically [on hold]

I have no clue of what is going on. My script goes this way: $i = 0; $c = $somecount; while($i < $c){ $en = comment_version($comments, $i, 'en'); $ru = comment_version($comments, $i, 'ru'); ...
0
votes
1answer
31 views

MySql MBRCONTAINS not accurate

I have a table that has 3 column. city_id, city_name and city_geo. city_geo type is geometry. and i have a another table that has a vehiclelog. I want to query if the latitude and longitude from ...
0
votes
1answer
33 views

How to implement Master Slave Replication using mysql [on hold]

Before moving on with question i would like to first tell you about my web project deployment architecture. Basically this website show details and values of various device connected on remote pcs. ...
0
votes
0answers
26 views

Query output conditional upon values in dataset

If the number column contains values 5 AND 6, AND the value X exists in the chr column, I would like to exclude rows with 10 in the test column. But, if the number column contains values 4 AND 5, AND ...
1
vote
0answers
14 views

Skipping stopwords (and indexing small words) for one fulltext index only, in MySQL

I have a rather odd situation where it might be preferable to not use stopwords and to have a value of ft_min_word_len equal to 1. The index in question would be dealing with only a few words per row ...
0
votes
0answers
12 views

Computer crash causes MySQL to leaves behind an .err file that stops mysql from booting on reboot

When my mac crashes it leaves behind an error file that I have to manually delete or MySQL won't start again. (fx1)kit:fx1 kitsunde$ ls -l /usr/local/mysql/data/kit.err -rw-rw---- 1 _mysql wheel ...
2
votes
2answers
74 views

What's the difference between MySQL Fabric and MySQL Cluster

I'm new to the MySQL world and was confused by the two. Don't they both provide high availability and sharding? Also, how does WebScaleSQL compare?
2
votes
2answers
45 views

Best practice design when expecting large data in a table

I have come across a way that kind of works for me, and was just wondering if it would have any side effects, or, if I'm just thinking about this the wrong way. I first had this idea when I was ...
-1
votes
0answers
19 views

MySQL 5.1 on Windows server - Increasing value in open_files_limit does not apply

I have increased the value of open_files_limit from 2048 to 4096 in my.ini file. But, this change has not been reflected. Below is my dedicated DB server configuration: OS: Windos 2008 R2 standard - ...
1
vote
1answer
22 views

Saas MySQL Multiple Databases or One Database [closed]

I am using MYSQL so Database is the Schema, sorry if not using right terminology. I currently have a Saas product which has multiple databases one for each client with a main databases which we ...
0
votes
3answers
97 views

How could I connect to MySQL database running on WAMP server from other computers in same LAN?

I'm new in web development. I'm requesting help from all of you. My problem is: I installed WAMP server in my desktop computer. My desktop computer has a static LAN IP (192.168.0.101). I'm able to ...
0
votes
2answers
31 views

How to create identity field in MySQL without using auto_increment column?

I am trying to create a dynamic system when a user can create different objects and relate them to another objects. I need is to be able to generate an identity column similar to auto_increment but ...