MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
38 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
18 views

mysql query matching multiple elements from a single table

I have this awkward query I'm trying to figure out. Basically it checks a table for matching / non-matching entries (data1, data2). My Table is: CREATE TABLE `test`.`tab1` ( `id` INT UNSIGNED NOT ...
0
votes
0answers
21 views

MySQL: “CREATE DATABASE mydb” command hangs

On my MySQL 5.6 server, when logged in as root, the command CREATE DATABASE hangs. No error message - nothing. The MySQL error log doesn't show anything special neither. What could I look into to ...
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 ...
2
votes
3answers
75 views

get all dates in the current month

i have a query in MySQL which serves me very well by getting all the records within the current month; SELECT date_field,val FROM MY_TABLE WHERE date_field>=(CURDATE()-INTERVAL 1 MONTH); The ...
0
votes
0answers
20 views

Performance hits with MySQL Left Joins and Order By

There are a lot of questions out there regarding this issue, but most answers seem to be very case-specific. I've tried to make this general so it'll help others too. The Issue We have a smallish ...
0
votes
2answers
22 views

how to GRANT EXECUTE on MySQL

I updated the timezone on an AWS MySql instance, and tech support told me I also had to runt his command for each MySql user: GRANT EXECUTE ON PyupROCEDURE `mysql`.`store_time_zone` TO ...
0
votes
1answer
19 views

Mysql Adding date/time stamp to file produced, or other method of automated file naming to keep resulting files unique

SELECT '"Part #"', '"Manu"', '"Qty"', '"partdesc"', '"Rohs status"' UNION all ( SELECT partno, manuf, qtyleft, partdesc, stfifo.ROHScompliance FROM stmaster, stfifo WHERE ...
1
vote
1answer
12 views

Can't enable binary logging (“index not found”)

I have a MySQL 5.5.41 server running on Ubuntu 14.04 that already contains several databases of data, and I would like to enable binary logging. I want the binary logs to be placed in their own ...
1
vote
1answer
21 views

Table for actual values

I have a database where logging happens and is processed in a data-warehouse styled environment. This means there are staging cycles where the data comes in and then is processed. For a reporting ...
1
vote
2answers
13 views

MySQL error 1593 on replication between 5.0.92 and 5.5.42

I'm migrating a server to new hardware and trying to set up replication to keep the site current until we switch DNS. The intention is to enable two way replication to make sure that the servers stay ...
0
votes
0answers
17 views

How to reduce connection usage,Traffic and No of mysql queries in a mysql server?

The problem i am facing is that sometimes the connection usage goes up to 100% and all services are stopped.what are the changes that can be done on Mysql server side to solve this problem? No of ...
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 ...
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 ...
0
votes
1answer
52 views

how to splitt a mysql table file?

I have a table in mysql database which innodb_file_per_table is enabled and one of my tables size is about 20G and growing up more and more. Now, I need to know How can i partition the table in ...
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
0answers
10 views

What is the most efficient way to translate and display dynamic database content in a jsp page? [closed]

I have been demanded the task of translating the database of an ecommerce site. Basically I need to translate the product names and categories. Translating static elements with resource bundles is ...
0
votes
2answers
28 views

mysql select count on same table slow subquery

I've a small table which contains a call log history. Now I want to make a report from this, so I have to find the number of outgoing and incoming calls. Company has a few extenstions ranging from ...
1
vote
1answer
40 views

Elegant Database Design

I'm trying to make "online Judge Environment"(like SPOJ). In which users have facility to see their past submissions for each question, their best code performance(like running time, if they succeed ...
0
votes
1answer
18 views

MySQL 2 Million Rows, longtext and varchar indexes

I'm trying to find a solution for this, with no success. I have a table with ~2M rows, and I need to do a WHERE with 3 expressions using OR. name LIKE '%PARAM%' OR text1 LIKE '%PARAM%' OR text2 LIKE ...
0
votes
1answer
42 views

How to reference a table called `\` (simply just backslash character) in MySQL in a query?

Through some unknown circumstances I have a table called "\" in a database. mysql> show tables like '\\'; +-----------------------------+ | Tables_in_in_realestate (\) | ...
0
votes
0answers
27 views

MySQL creates lowercase database / table names

I'm currently building an application which requires a large MySQL database. Whenever I run the script, it executes perfectly but all of my table names (and the database name) end up in full ...
1
vote
1answer
22 views

does character ' and ` equal in mysql command?

mysql> select 'user_url' from wp_users; mysql> select `user_url` from wp_users; It can get the same result ,does character ' and ` equal in mysql command?
1
vote
1answer
24 views

Storing multiple IDs in column or in new table

I'm fairly new to the databases and I'm now creating little project where I have a database and I want to store deck of cards into the table where each card has its own ID (for example 52 cards in a ...
0
votes
1answer
29 views

Call a stored procedure for every select result

I have an stored procedure to delete from a long series of tables. It uses one main ID as parameter. I have to delete a bunch of rows based on a view that show that lot of tables. I want to apply the ...
-1
votes
1answer
27 views

SELECT rows with duplicate values

I have a table of names in mysql InnoDB as Firstname Lastname Steve Ross John Doe J. Doe Mike Ross Michael Ross Roger ...
1
vote
2answers
31 views

Two (almost) identical queries, but only one of them uses the index

I have a table with two columns, batch_id and study_id. There are indexes on both columns. I want to get a random row back from MySQL. I originally wrote: SELECT * FROM alt_join_batch_study ORDER BY ...
1
vote
1answer
43 views

SELECT performance on MariaDB Galera cluster vs. MariaDB is terrible

We are evaluating a Galera setup and so far we have not noticed to many drawbacks except a few queries that have terrible READ performance I cannot put my finger on it. The query by itself isn't ...
1
vote
0answers
40 views

MySQL database table creation is very slow

I´ve run a test script that creates a database and 3 sample tables. Machine: Windows 7 x64 and MariaDB 10.0.17 DROP DATABASE IF EXISTS dbTest; CREATE DATABASE dbTest; USE dbTest; SET profiling = 1; ...
0
votes
1answer
21 views

InnoDB index concurrent inserts

I have an InnoDB table with an index on it. I have a few million rows to insert, so I thought I might take advantage of the row-level locking and do it in parallel. I'm inserting in batches of 10000, ...
0
votes
1answer
15 views

On triggers and replication in MySQL

I have a classical statement-based replication between the master and the slave. Triggers were created on the master and replicated on the slave as well. Assuming that I have, say an ON UPDATE ...
0
votes
1answer
19 views

MySQL max_connctions+1

I experienced an incident that my connections are full. Even I as an administrator I cannot log to MySQL due to "too many connections.". Does anybody knows how to setup this max_connections+1? I use ...
0
votes
1answer
23 views

Optimizing a query on Mysql 5.5.24

I am trying to optimize the query SELECT CONCAT(lastname, ', ', title, ' ', firstname) AS fullName, e.lastname, e.firstname, e.email, e.userType, e.userID FROM employee e, ...
0
votes
2answers
23 views

MySQL slow query log file time elapse

Does anybody know when the mysql slow log file delete slow query records? based on my daily observation. The log file starts at 7am. I have searched for this but nothing answers me clearly. My server ...
0
votes
1answer
21 views

Select arbitrary amount of rows from child table and join them into parent table as columns

Good evening StackExchange DBA's. I've been asked to pull pull back every piece of information from on of our machines and export it. The problem in is, all of the values in question are spread ...
0
votes
1answer
19 views

How to improve mysql replication performance reading the relay logs in slave?

I have a mysql 5.5 row-based replication being done. The slave is slowly getting delayed relative to the master. On show slave status I see the distance between Master_Log_File and ...
-2
votes
1answer
20 views

SQL functions to return user ID [closed]

How to make MySQL function that will proceed user ID and return a full number of his friends? Could you help me, please?
0
votes
1answer
12 views

Mysql Multiple data files rollover size

we want to setup the mysql ibdata files in such a way that after every 100M , new data is added to another file specified in innodb_data_file_path i.e. ...
-6
votes
3answers
222 views

Does “deprecated” in MySQL means “not guaranteed” or “still guaranteed”?

MySQL 3.23/4.0/4.1 and 5.1 states: If you use GROUP BY [ for select ], output rows are sorted according to the GROUP BY columns as if you had an ORDER BY for the same columns. ➫➫➫ However, MySQL ...
0
votes
1answer
17 views

Mysql query to find nth largest entry in a column

I searched on internet to find the nth largest entry in a particular column for Mysql. I found the following query: select salary from employee e1 where (n-1) = (select count(distinct(salary)) from ...
1
vote
2answers
27 views

How do I give root@localhost permission to grant privileges in MySQL?

Whenever I try to Grant Privileges as root@localhost, it says permission denied (using password=Yes). My root user is the one that I am logged in as. I verify this by select user(); It responds ...
1
vote
2answers
32 views

Speeding Inserts of longtext or longblob columns

i'm currently migrating a DB2 database to MySQL, using SQL WORKBENCH Tool It basically does a select from DB2 and Insert to DB2. It works fine, but on the tables with longblob or longtext columns ...
-3
votes
1answer
43 views

MySql - Get all child categories until not exists

Based on this answer, can you please tell me what's wrong in the next code ? I'm trying to get all child categories. The example that I try it is: DELIMITER $$ DROP FUNCTION IF EXISTS ...
1
vote
1answer
27 views

how to connect mysql database in my vps from remote machine?

I have installed mysql database on my vps ip, and input the following command when to login mysql. mysql> GRANT ALL PRIVILEGES ON . TO 'root'@'%'IDENTIFIED BY 'passwd' WITH GRANT OPTION; mysql> ...
-1
votes
0answers
21 views

mysql command not restoring data

I have been using this command successfully to restore data in mysql but it is not working right now. The command runs successfully as usual but the database remains empty. I am using ubuntu 14.04 ...
0
votes
1answer
28 views

Retrieve user id for users that have 5 specific rows

I have 2 tables: Titles and Data They have a One-to-One relationship The entry_id in Titles t = entry_id in Data d I need to retrieve the t.author_id for those users who have 5 specific rows in the ...
0
votes
2answers
37 views

How to change mysql password

I am on OS X 10.9.5 and I did a reinstall of mysql2 and I provided a password during installation but it is not working when I run the command mysql -uroot -p. The result I get is: ERROR 1045 (28000): ...
1
vote
1answer
9 views

Reducing query cache for mostly INSERT-heavy database?

What sort of MySQL query cache should I choose considering the following... Large, rapidly growing database (I got 500,000 rows). UPDATEs practically never happen. SELECTs are rare, but when they do ...
0
votes
0answers
17 views

How does this database design layout look?

I'm not sure where else to put this (such as a normal forum or what not) I'm currently learning about MySQL and MSSQL, and as a side project, I'm creating a website from scratch, that includes ...
0
votes
0answers
18 views

Help with Galera Cluster Auto_Increment

We're currently running a Galera cluster of 3 DB nodes. The way we're set up (due to ORM and automagical locking), we only have one of the 3 DB nodes being written to, and the other two provisioned ...