MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

-2
votes
0answers
3 views

Mysql 5.6 very slow on windows server 2012 compared to other platforms

The below command takes 2-3 seconds in a Linux MySQL 5.6 server running Php 5.4. Also on windows 8. mysql --host=$db_host --user=$db_user --password=$db_password $db_name < $sql_file On windows ...
1
vote
1answer
176 views

Not able to update MySQL table using Oracle: Unknown column in 'where clause' {42S22,NativeErr = 1054}

I have the following tables: MySQL table: jti_member_interact CREATE TABLE `jti_member_interact` ( `INT_MEMBER_ID` int(11) NOT NULL, `INT_ID` int(11) NOT NULL AUTO_INCREMENT, `INT_SOURCE` ...
-1
votes
0answers
5 views

This query returning different result sets [on hold]

Hi is have this query (SELECT DISTINCT CONCAT (MONTH(`Date`),'-',YEAR(`Date`)) from wp_result_plugin WHERE Bet=$Bet AND month(`Date`) = EXTRACT(month FROM (NOW())) ORDER BY MONTH(`Date`) ASC LIMIT ...
0
votes
1answer
208 views

MySQL crashing randomly

We have a sever running a website Joomla 2.5. We are facing frequent mysql crashes that occur when website has medium visitor load like a few thousands. It appears that mysql consumes more memory and ...
0
votes
1answer
13 views

SQL: Refer to renamed columns in WHERE clause

SELECT name, gdp/population as capita FROM world w1 WHERE continent = 'Europe' AND capita > (SELECT gdp/population FROM world WHERE name = 'United Kingdom'); How come I can't refer to ...
0
votes
0answers
6 views

MYsql/PHP - max_user_connections

I sometimes have an error where I have reached my max_user_connections. My hosting company does not want to increase it further. If I create an additional user, and 50% of the time connect to that ...
0
votes
1answer
99 views

Processlist show most of the queries are sending data for select query

I have faced some problem like sending data state in processlist. In my application I used parallel processing which send 50 count at a time, and that will do some MySQL database operation (select and ...
0
votes
2answers
653 views

SQL - Cannot Add Foreign Key Constraint

Can anyone tell me why there are errors such as : Cannot Add Foreign Key Constraint And am i on the right track ? DROP DATABASE technology_university_hospital; CREATE DATABASE ...
1
vote
1answer
1 view

Made changes to my.cnf and mysqld wont restart - no backup

I thought I'd be clever and update my.cnf file to add ft_min_word_len=2 and didn't back it up first. I will never make that mistake again. Luckily, our project is still in production and no harm done. ...
0
votes
1answer
317 views

MyISAM : Should I be concerned by these warnings?

I restored some tables from recent Databases backups. Because Im supporting a legacy system that only uses MyISAM tables in their DBs, for backing up I used a little script that pretty much copies all ...
1
vote
2answers
564 views

Errors while creating multiple mysql-5.5 instances

I have installed 3rd mysql instance on my testing server. 2 instances already running without any issues. When I installed 3rd instance by mysql-5.5.30 zip source, it installed successfully but when ...
0
votes
2answers
147 views

What's faster: two UPDATEs with WHERE (in / not in) or one UPDATE with CASE?

What's best performance wise, two separate UPDATEs: UPDATE table1 SET enabled = 0 WHERE code NOT IN ( SELECT id FROM table2 ); UPDATE table1 SET enabled = 1 WHERE ...
0
votes
1answer
162 views

Relation between multiple hierarchical taxonomies linked to a single entity

I am working on an online test application which supports multiple choice questions. I have created schema for taxonomy (classification) system to be used with questions. taxonomy(id, name, slug, ...
0
votes
0answers
18 views

create table from another table

I have master categories table like this category_id category_name parent_name parent_id 1 animals & pet supplies null 0 2 ...
0
votes
0answers
5 views

How to calculate sum of a column in a table accessed with multiple joins and where condition

I am unable to find correct sum of vaccinated based on campaign id. no matter which campaign I choose to get sum of vaccinated on the basis of that campaign id it always returns the same data. Please ...
0
votes
1answer
8 views

best way to store tags

I'm a university student building a web application for a project with three collegues , I took the database portion. Our site is basically a link sharing site and supports tags, what is an efficient ...
0
votes
1answer
13 views

Fetch data from second table based on first table

I'm new to the world of databases and I've just started making my first DB powered site with php and MySQL. I've got it working with data from one table but now I need to get a url to the users ...
0
votes
1answer
27 views

Why people often said nosql has better write performance than sql? [on hold]

I have been hearing these comments all around the internet. But I cannot see a good justification for it. Agree that nosql use de-normalized scheme to store data, which does not require join (for ...
0
votes
1answer
1k views

MySQL PDO Cannot assign requested address

Can someone help me with this error? [08-Apr-2013 17:44:08 Europe/Berlin] PHP Warning: PDO::__construct(): [2002] Cannot assign requested address (trying to connect via tcp://****:3306) in ...
0
votes
1answer
28 views

MySQL: Update table by closing existing record and inserting a new one?

I want to update a specific table but in the following manner. When a record is completely the same (so not only the primary key, but all fields) then I don't want any changes (or a new record ...
2
votes
2answers
1k views

Why would increase in innodb_buffer_pool_size slow down MySQL?

5.1.68-cll - MySQL Community Server on CentOS The system has 32GB of RAM. I increased innodb_buffer_pool_size from 10240M to 15360M (10GB -> 15GB). Time taken for a series of identical operations ...
3
votes
4answers
689 views

MySQL replication - slave update

I have a master slave setup of MySQL and my question is that if I make any changes in the slave database: 1. Will it mess up the sync in any way 2. Will the changes get overwritten from the master ...
0
votes
0answers
9 views

indexable JSON datatype in MySQL/MariaDB

In PostgreSQL 9.4 there is a JSONB datatype which allows you to index on fields in the stored JSON objects. Does MySQL/MariaDB have an equivalent? I'm specifically interested in the MariaDB Galera ...
1
vote
1answer
7 views

MySQL 5.6 upgrade - reducing code changes / developer burden

Does anyone know the key things that should be done when moving to MySQL 5.6 to reduce the amount of code changes required? I found that new installations of it have STRICT_TRANS_TABLES set for ...
1
vote
2answers
115 views

Is there a best practice for recurring calendar events

I'm not a dba but a php programmer, so that I'm not an SQL pro. Now, I have searched in both programmers and dba stackexchange sites but the answers are too specific or not conclusive. My question is ...
-1
votes
0answers
28 views

MySQL - Combining multiple rows as one in one table [duplicate]

I have one table employeeId | attribute | value 1 name John Doe 1 email john@example.com 1 age 28 2 name Jane Doe 2 ...
1
vote
0answers
14 views

(VS Comm./VB6) How to Select from 2 different data sources/formats in one query?

I have two working TableAdapterQueries in my project, one selects from a MySQL database on a virtual server I own, the other is an Oracle PL/SQL database on a separate server. The data (and ...
0
votes
1answer
219 views

Transfer all read request to Slave in Master-Slave MySQL

I have configured master slave on my system (MYSQL). Now, is there is any script or way available or possible to transfer all read request to SLAVE. So, let me make my question here more clear. I ...
0
votes
1answer
166 views

Update query in a trigger

I have a configuration table: Table: refdatecol - id int(11) startdatecol varchar(100) enddatecol varchar(100) datecolTable varchar(100) This table holds the user configured column names ...
0
votes
1answer
148 views

SSIS Dataflow Task issue, moving data from SQL Server 2008 to MySQL via ADO.Net

Can you please help me in getting this problem solved.. I'm trying to build a SSIS package where I'm moving the data from SQL Server 2008 to MySQL. However I'm getting a weird problem in dataflow ...
2
votes
2answers
27 views

longtext in select makes query extremely slow, even if not used in where clause and empty result set (MySQL)

As soon as I include a "longtext" type in the select clause, the query times go from 8s to 3min (Amazon RDS t2.small). The longtext isn't used in the where clause, and the result set is empty. See ...
5
votes
1answer
332 views

Deadlock free MERGE-alike in MySQL?

I am trying to implement some parts of MERGE in the MySQL driver in Drupal. Of course, Drupal has something but in truth it only works because the most frequent MERGE issuer just eats exceptions. So, ...
2
votes
1answer
14k views

MySQL import csv file ERROR 13 (HY000): Can't get stat of /path/file.csv (Errcode: 2)

I am an absolute beginner to MySQL (5.5.34) / Linux (Ubuntu 12.04 LTS)` I have created a simple database with one table. When trying to import data into it via a 'data_test.csv file an error message ...
1
vote
1answer
13 views

Running Total: To store or compute

Say I have a product table with the following columns: product -------- product_id name And I have another table to record the transaction (IN/OUT) for each product product_transaction ...
0
votes
0answers
8 views

How to get line that causes error when loading from csv to MySQL

I'm trying to load data from CSV file, but occurs error Error Code: 1366. Incorrect integer value: 'abcdxxx' for column 'col' at row 123545. I Have file with multiple breaklines CRLF's in content, ...
0
votes
6answers
10k views

How to recover deleted/updated record in sql server or mysql?

I want to know that is there any way that I can can recover the deleted or updated record in the sqlserver and mysql as well?
1
vote
1answer
234 views

I need advice on these queries

could you help me optimize these queries? here are queries, please note that you see something like OR 1=1 OR those are values I pass via php and may change. query#1: SELECT posts.status, ...
0
votes
2answers
851 views

SQL Query is sometimes slow, sometimes fast

I have two hosts, one with my rails app, one with my MySQL database. Going through my rails Logfile I can see that sometimes queries take much more time than the same query at other times. Think 200ms ...
0
votes
1answer
31 views

MySQL InnoDB 5.6.23 cannot start segmentation fault 11

I have a Linux Gentoo server which has OwnCloud application installed. It works for about 2 months with out any problems, and sudden this morning MySQL died. I have tried to restart mysql server and ...
0
votes
0answers
20 views

Counting per status group makes query very slow

I have an Intranet system developed that takes in orders and every order item has their own status, i.e. "Printed", "Labelled", "Filed", etc. This query will need to count how many items there are in ...
0
votes
2answers
138 views

MySQL - prevent OS cache for query

On high load production server I have many sql selects which are unique or re-use will be in hours. I use SQL_NO_CACHE but this queries are still cached with OS cache. Server have 64G ram and used ram ...
0
votes
2answers
2k views

Mysql Server Login and Permission Deny Error

I have a problem with MySQL server. After upgrading MySQL server from 5.3 to 5.4, I am not able to log-in using my MySQL root password (Yes, I am able to log-in without password!). Also not able to ...
0
votes
1answer
18 views

Are certain environment variables required for mysql login-path?

I created a bash script that backs up my database, db_backup.sh It basically just runs these commands: DB=/home/linuxuser/backups/backupfilename.sql.gz mysqldump --login-path=local db_name | gzip ...
0
votes
1answer
26 views

Migrate MySQL 3.23 Data

I have .FRM, .MYD and .MYI files from a MySQL (version 3.23 I think) database from back in the early 2000's. I managed to get the files into a Windows installation of 3.23 and then dump it, however I ...
0
votes
2answers
22 views

insert multiple depend on prev queries

I need to insert multiple records into a table. The number of records depend on the result of another query. For example:I want to insert booking detail depend on number of room customer choose. If ...
1
vote
1answer
36 views

Difference beetween mysql 5.5 and 5.6

I have a big performance problem beetwen my local mysql instance and the server. I have this request : DELETE a FROM a LEFT OUTER JOIN ( SELECT MAX(id) as id, `v_id`, `v_statut`, `c_controle`, ...
0
votes
1answer
30 views

MySQL: check max chracter length (ERROR 1118 (42000): Row size too large)

I'm trying to convert/copy MyISAM to InnoDB table and I'm getting the following error message: mysql> INSERT INTO test.innodb_table SELECT * FROM test.myisam_table ERROR 1118 (42000): Row size ...
0
votes
1answer
17 views

Mysql: binary log vs transaction log

In mysql with innodb, there are two types of logs: binary log and transaction log. I know transaction log is specific to innodb. But when comes to replication, backup and crash recover, what roles ...
0
votes
1answer
20 views

Optimization for aggregation and grouping with MySQL

I have an application that is pulling data on a daily basis from numerous APIs, storing it and then presenting it on the front end in various charts, tables, etc.. I'm having some issues avoiding ...
0
votes
1answer
435 views

Mysql closing immediately after new installation

I am using mysql as an backend for my webapp ,the software ran without any glitch but today it gave unexpectedly ERROR:2003 i tried many solution on the internet but none worked. so reinstalled the ...