MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
21 views

Am I using the ORDER BY clause incorrectly

I am trying to enumerate a database, created specifically for the purpose of learning SQL injections. I am trying to discover the number of columns a particular select statement might be using. I do ...
0
votes
0answers
6 views

How to move MySQL 5.6 data file on Windows 7

I don't get it. I am administrator on my machine, but I cannot move the data files. I get access denied errors when I attempt to. There was no my.ini in C:\Program Files\MySQL\MySQL Server 5.5, so I ...
0
votes
0answers
9 views

Can't run subqueries on my server (MySQL)

I have a weird problem, where I can run sub-queries just fine on my local machine, however they seem to be hanging forever when I attempt to run them on my server. Note that my server has plenty of ...
-3
votes
0answers
9 views

mysql store procedure select promblam [on hold]

delimiter // DROP PROCEDURE IF EXISTS aProce; CREATE PROCEDURE aProce(IN FIRSTDATE DATETIME, IN LASTDATE DATETIME, IN CONSIGNERS VARCHAR(255)) LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY ...
0
votes
0answers
10 views

MySQL migration to new hardware + upgrade + huge DB + windows

I am relatively new to DBA work and have a critical task in front of me, I really appreciate any detailed help you could offer. What I have a is a roughly 340 GB MySQL database on a Windows server. ...
1
vote
1answer
26 views

Nested query efficiency in MySQL

I have a table with several attributes like this: id id2 attribute -------------------------------- 1 100 blue 2 100 red 3 100 green 4 100 white 5 102 blue 6 102 green 7 102 ...
1
vote
3answers
48 views

Two MySQL Server accessing same database over NFS

I want to run two separate MySQL instances on two separate machines, but using same data directory over nfs, is it possible with InnoDB Storage Engine? Application operation will assure the following: ...
3
votes
4answers
184 views

How to check for existence of an INDEX on a column independent of used SQL database

Is there are unified way of how to check for the existance of an INDEX for a given column irregardless of the actual SQL database system used? For MySQL one could for instance check for the existance ...
-2
votes
0answers
37 views

cant pass table name as argument in a same procedure

delimiter $$ create procedure proselect (IN tname varchar(20)) begin set @s=concat('select * from ',tname); prepare stm from @s; execute stm; end $$ call proselect('table1') ...
2
votes
2answers
22 views

Can creating indexes colide with future database upgrades?

I have a mysql Database with very slow querys. I am using the slow query log to monitor those. This is a database created by a third party software that we're using. Their developers didn't do any ...
-1
votes
1answer
13 views

MySQL 5.7.4 Startup Times Out

I recently upgraded the MySQL Server installation on my Windows 8.1 Pro x64 laptop from 5.7.3 to 5.7.4 using the MySQL Installer, and after doing so, attempting to start the MySQL Server service, ...
0
votes
0answers
18 views

restoring huge MySQL database would location of sql file on a mount significantly slow restore (linux)

Hi I neglected to move the sql file from the mount before starting the mysql -h localhost -u root 'my_data' < /mnt/mirrorserver/huge.sql and the restore has been running all night as my mysql ...
0
votes
0answers
10 views

TokuDB fails to load in MariaDB, even when transparent hugepages are disabled

Earlier, I upgraded my website server to Ubuntu 14.04 LTS. I had a very nice setup with MariaDB and the TokuDB engine. However, the setup was kind of messed up when TokuDB refused to load properly, ...
0
votes
1answer
31 views

Select row with MAX(), or choose one if no MAX() exists

I have a MySQL InnoDB table with the following columns: id: UNSIGNED bigint(20) AUTO_INCREMENT (PRIMARY KEY) name_id: UNSIGNED bigint(20) time_stamp: decimal(26,9) event: enum('add', 'init', ...
0
votes
1answer
27 views

Please explain how this query generates a calendar table in MySQL

This page has a pretty neat way of generating a robust calendar table. I've copy-pasted it below: CREATE TABLE calendar_table ( dt DATE NOT NULL PRIMARY KEY, y SMALLINT NULL, q tinyint ...
0
votes
0answers
4 views

Error generating mysqldump with flush tables read lock option

I wrote a simple bash script that generates mysqldump while locking the tables. # Generate mysqldump that will be used on client side Q1="USE test;" Q2="FLUSH TABLES WITH READ LOCK;" Q3="SYSTEM ...
2
votes
1answer
19 views

Is there any difference between these two version of MySQL - 5.1.73-community-log Vs 5.1.73-community

I have installed MySQL 5.1.73 in Oracle LINUX 5 server. Just after RPM installation, I checked system variables and found that version is 5.1.73-community. When I copid ...
-1
votes
0answers
21 views

Report Builder 3 error [migrated]

Connecting to a report server running Win 2k8 R2 with SQL 2012. The dataset is coming from a linux box running MySQL. I can create a report in Report Builder fine. All the data pulls from MySQL ...
2
votes
0answers
20 views

Does MySQL guarantee atomic upgrade from read lock to write lock?

If a client session is currently holding a read lock (to allow concurrent reads while already preventing writes), and then acquires a write lock on the same table(s), does MySQL guarantee that the ...
0
votes
0answers
4 views

MySQL Workbench EER Diagram and ENUM data type

I am creating EER model diagram using MySQL Workbench (version : 5.2.47) The version for MySQL, I am using is 5.5.35-0ubuntu0.13.10.2. I have created a schema with 'Default Collation' set to 'utf8 - ...
0
votes
2answers
22 views

Sorting of results is slow some times but fast at other times

I have a mysql query that is joining a few tables and then uses order by field for sorting. It sometimes runs quite fast at other times it is slow. While it was slow i profiled the query to find that ...
0
votes
1answer
25 views

How to check if several tables exist in database, and how to show it in Mysql

I would like to check if several tables exist in a database, and return a easy to understand return, I know you can check if a single table exists by running show tables like "foo"; but is there ...
0
votes
2answers
31 views

How can I genereate a string from the returns of a SELECT query in Mysql?

I need to create a string from data that is extracted from an SQL query, and wish to accomplish it within the SQL Query. The return is something like +---------------+ | foo_ids | ...
0
votes
1answer
13 views

Mysql tar ball installation

I need to install two different versions of Mysql in one server OS RHEL6 and it will be separated by user called mysqlprod and mysqlpreprod. I need to separate their binaries, softwares,data ...
0
votes
0answers
18 views

MySql query keep running for a long time

Following query keep running for a long time and I'm using MySql 5.5.34 on XAMPP on Windows SELECT id_package, `pck`.`fk_sales_order`, `pck`.`fk_picklist`, count(pci.id_package_item) as items, ...
0
votes
1answer
24 views

Inserting empty string on Windows MySQL doesn't use default value

Why inserting '' on a column with default integer value on MYSQL/WINDOWS produces ERROR 1366 (HY000): Incorrect integer value: '' for column 'id' at row 1 The query is: insert into test2 (id,test) ...
0
votes
0answers
9 views

How is the key length determine in an index?

Aside from explicitly setting the key length when creating an index, how does MySQL determine the appropriate key len shown when running "explain"? Thanks
0
votes
0answers
12 views

Is there any value in adding a pk column to an composite index? [duplicate]

I recently inherited a database with indexes that contain the table's primary key as part of some composite indexes. Given MySQL adds a hidden column representing the PK regardless of whether you ...
1
vote
1answer
19 views

Is there any value in adding an already indexed column to a composite index?

The title says it all. Does the query optimizer see composite indexes where each column is already indexed as redundant? Or, is it used when each of the composite index's columns are in the WHERE ...
0
votes
0answers
20 views

MySQL best practice DB recovery

I am trying to figure out what is the best practice is for Mysql recovery after a power failure. I need to find a way that if a server (which is running on a virtualbox VM) goes down when it goes ...
1
vote
1answer
13 views

Migrating MyISAM tables from 5.5 => 5.6

I was wondering if anyone had any pointers on migrating MyIASM tables from mysql 5.5 to 5.6, specifically using Percona builds, via an rsync? Is this safe? I know we need to do a full ...
0
votes
2answers
22 views

Does MySQL have a version of Change Data Capture?

We're in the process of phasing out an old system and migrating onto a new one. The last time that we phased out an old system, we ran both systems in parallel and integrated data between both until ...
0
votes
2answers
24 views

How to Identify the user who issued MySQL Shutdown command

We have had several situations when our production MySQL server suddenly became unavailable. The error log just shows "Normal shutdown" followed by the typical shutdown messages. How can I determine ...
0
votes
2answers
42 views

JOIN on variable number of columns

I have the two tables courses AND something_about_courses: courses course_code course_session course_type something_about_courses course_code course_session some_description To ensure that I ...
0
votes
1answer
22 views

InnoDB primary key efficiency

I've read a number of articles regarding efficiency of primary keys depending on the storage engine, and I am left confused. Given a simple many-to-many table with two fields, storeId and zoneId, ...
0
votes
1answer
13 views

How to structure renting and sale as type of purchase?

I'm currently planning a database which involves two different types of Products that can be bought outright, or rented for a weekly or monthly amount. I'm just trying to figure out how to structure ...
-2
votes
0answers
41 views

Unclear deadlock condition messages in MySQL 5.6.17

I have recently upgraded from MySQL 5.6.10 to MySQL 5.6.17 in production server. In previous and in recent version i am getting deadlocks very frequently perhaps in every 5-10 minutes. I have online ...
0
votes
0answers
40 views

update and select is taking over 1.2 seconds to return [on hold]

I am trying to debug my MySQL server which takes up to 1.5 seconds to execute and return a simple update or select command. I have around 600k rows in this particular table and the db engine is ...
-4
votes
0answers
13 views

I can't connect with the DB through the php file. [on hold]

i can't transmin from php file,to the localhost db created with phpMyAdmin. I doesn't giv mi any errors,but still,doesn't transmit the informations. The code is simple. from e form with post method, ...
2
votes
2answers
89 views

Why is this MySQL SELECT performing so slowly despite indexing?

I have a large MyISAM table A (500m entries) that connects two other tables B,C with a n:m relation. So my table A looks like this: CREATE TABLE `A` ( `id_b` int(10) DEFAULT NULL, `id_c` int(12) ...
1
vote
2answers
44 views

Do Inactive MySQL Databases Consume Memory?

I have inactive databases that are on the server just for archive purposes. I know I can do mysqldump for all of them, but I am not 100% sure they are inactive. When I started my system I didn't ...
0
votes
0answers
14 views

using the wordpress approach for storing taxonomies

multiple tables vs single table a user table will not need every social link in the database column, since every one will not enter all their social links and are used only on user profile ...
0
votes
1answer
13 views

MySQL group concat not showing distinct values when joined to another table

I have one view that gives me comma separated values and want to use that data in another view. In the first view, I am using group_concat( distinct ...) and when I run that view by itself, I can see ...
1
vote
0answers
19 views

Why is this MySQL query performing slowly despite correct indexing? [duplicate]

I have a large MyISAM table A (500m entries) that connects two other tables B,C with a n:m relation. So my table A looks like this: CREATE TABLE `A` ( `id_b` int(10) DEFAULT NULL, `id_c` int(12) ...
0
votes
1answer
14 views

Report Builder cannot publish to report server

This is currently in a cloud lab environment. We're not allowed to join any AD domains. We have a linux server (RHEL 6) running MySQL 5.3 and a Windows SQL Server 2012 on Win 2k8 R2. Our laptop is ...
0
votes
1answer
29 views

Adding new tables — memory usage increases

I added more tables to my mysql server. 20% increase in tables that are all innodb. I have 200 + databases that use the same schema. Does adding more tables increase memory usage? I am using about ...
1
vote
0answers
38 views

High concurrency is even slower than low concurrency in mysql?

My application is supposed to handle high concurrency insert/update, now I have only one mysql instance setup for test. My application is full asynchronous, it should be able to handle 10,000 ...
0
votes
1answer
57 views

Query multiple rooms with different conditionals (Adults, Children)

I have a simple query where I select available x Rooms with x Adults + x Children per hotel that matches a date range, but I'm having a hard time trying to figure out how to query a list of rooms per ...
0
votes
1answer
28 views

MySQL: Converting Character set fails?

I'm in the progress of migrating my database from latin1 to utf8 character sets/collations. I wrote a simple script that loops through all of my tables and executes this statement: ALTER TABLE ...
0
votes
0answers
39 views

Mysql Insert taking too long. Table need optimzation

I have around 60 tables and a video table with over 600,000 rows. with 4 Btree and 2 FULLText Indexes and have around 30 Columns. Server Specs are high, over 30G of Ram, Intel Xeon Processor. Mysql ...