All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

learn more… | top users | synonyms

1
vote
1answer
166 views

Write-lock a whole table during transaction

I need to perform a delicate operation to my table in which I will solely insert, delete and select upon all of my rows and no God may interfere with the table during this operation: the table will be ...
3
votes
3answers
2k views

Mysql 5.5 InnoDB growing CPU - Going crazy

Good morning, I'm currently facing a problem where CPU usage keeps going up until the server crash. I've tried multiple best practices proposed in this forum and on Percona, reinstalled the server ...
1
vote
3answers
151 views

How to get MS Access to reach a Linked server on MSSQL

We have an MS Access DB that has been in place for 16 years in a Front End/BackEnd configuration. It is now running under the latest version of MS Access using ACCDB files. Since its inception, we ...
1
vote
2answers
186 views

cannot access my DB server on ubuntu

server OS: Ubuntu 14.04 MYSQL Server version: 5.5.43-0ubuntu The output of: select User, host from user is: db % db localhost In my /etc/mysql/my.cnf, I made sure that bind-address is ...
3
votes
3answers
6k views

/usr/libexec/mysqld: Normal shutdown, but my team doesn't do that?

One of my databases has been shutting down abnormally, but the log said "normal": 130422 13:23:01 [Note] /usr/libexec/mysqld: Normal shutdown 130422 13:23:01 [Note] Event Scheduler: Killing the ...
0
votes
1answer
14 views

index and small set of possible values

I have a string column that I want to be part of a multi-column index in a large table in MySQL. There can be only a few different values in this column. If I knew these values in advance, I could ...
0
votes
1answer
16 views

Best storage engine for huge tables with mostly update operations (74 million records, MyISAM table size 7.6G)

What will be the best storage engine for table with 74 million records, currently stored as MyISAM table size 7.6G. Operations are mostly select and update. DDL operations (ALTER ADD COLUMN) are ...
0
votes
1answer
18 views

SELECT Query is slow when run remotely in MySQL

When I connect MySQL from remote server and run below query then the results are very slow(Sometime even faced lost connection Issue). However when I run the same SQL query on the local machine then ...
0
votes
1answer
130 views

Moving data from one table (a million records in it) data to another table which in remote location? (MySQL)

I want to move data from one table which have more than 2 million records in size into another table which is in a remote machine, and that moving should support Logging Restart Exception handling ...
0
votes
0answers
9 views

Synchronize more than two databases mysqlyog

I use mysqlyog in order to synchronize two databases. My question is whether I can use it in order to synchronize more databases. (I have one development database and I would like when I make a change ...
0
votes
0answers
15 views

How knowing information between linked servers (MySQL & MS SQL)?

I am new to StackExchange Database Administrators and have just a little bit of experience with Databases (mostly MySQL). I have been asked for my job to link a MySQL Database to a MS SQL Database, ...
1
vote
1answer
2k views

MySQL SELECT query hangs - Opening Tables INNODB

On my server I have 6 MySQL databases. They all power Wordpress websites. For some reason, 2 of these databases are not accessible. To my knowledge they use INNODB, but I can't confirm it as even ...
0
votes
1answer
116 views

MAMP #2002 error

phpmyadmin returns this: #2002 - Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) The server is not responding (or the local server's socket is not ...
4
votes
2answers
114 views

Nested table hierarchy: foreign key duplication vs. join

I have a nested table hierarchy, similar to the following one (this is an example but demonstrates the schema well enough): +---------+ +---------+ +---------+ +-------------+ | users | | ...
4
votes
1answer
1k views

SQL set profiling

I'm setting up an automatic database backup for a website. When I try to do a backup it comes up with the error" MySQL error: The 'SHOW PROFILE' feature is disabled; you need MySQL built with 'enable-...
2
votes
1answer
236 views

Services don't have MySQL Server. How to run it?

I need to run MySQL Server on a new for me laptop. There's Windows 7. And MySQL have been installed on it. In order to verify this, I opened the Programs and Features window and saw it there: ...
3
votes
1answer
417 views

Bi-directional replication for the same MySQL table

AppA stores/retrieves data from dbA.tableA AppB stores/retrieves data from dbB.tableA tableA definition is the same across these databases. To start with dbB.tableA was copied from dbA.tableA (...
0
votes
2answers
228 views

How can delete an orphaned temporary table on Mysql Innodb?

I was issuing an Alter table statement and suddenly the server crashed, Now i can not run any alter table to that table because it shows me the error 1050 and it says that a table named #sql1504d ...
0
votes
0answers
14 views

How to restore MySql DB from previous version files

My wamp server crashed a few days ago and I couldn't save the DB from phpMyAdmin. So I saved the folder bin/mysql/mysql5.6.13. Then I installed a new wamp version which comes with myslq5.7.11. I've ...
2
votes
1answer
1k views

Migrating from Oracle to MySQL using WorkBench Migration Tool

I am currently migrating from Oracle to MySQL and I am going to use the migration tool in workbench to help me with the procedure. I have entered my source connection details as follows: Database ...
2
votes
1answer
133 views

Import SQL dumps (tables) in folder from shell

Im trying to import SQL tables (actually this is files, one file for 1 table), and this is files are too big for importing in phpMyAdmin. It needs to be imported from shell. I know the command "source ...
0
votes
1answer
23 views

Mysql Inner join performance

I have performance problem! I searched for Inner Join, tried optimize table but still the same. I have Users, Entries, Tags and tag_user tables. This code works perfectly : select * from `entries` ...
0
votes
1answer
13 views

Identify duplicates and apply logic

I have a largish 27mil row table. The table contains a large number of duplicate string values due to case variance. All rows have the string column and also one additional numerical column, and I ...
0
votes
1answer
12 views

Mysql : Aborted connection …/… (Got an error reading communication packets)

This error message had submitted many times in this forum. I have tried the following without success. Context This is a Symfony1/Doctrine1 web application. The error appear on my computer and on ...
0
votes
1answer
137 views

mysql database migration of schemas with updated data and structures

I am a newbie with MySQL database dumps and am currently trying to work with data migration between a source schema and a target schema. Assuming the source schema is defined by (...
0
votes
2answers
63 views

Effective way to migrate from SQL Server to MySQL

I have a 20GB Microsoft SQL Server database that needs to be migrated to MySQL. Right now I only have the schema for the source db. I tried the migration wizard on the schema in MySQL Workbench and ...
0
votes
1answer
143 views

Query running slow on script and producing error 500 when run in phpmyadmin

I have a query that seems to take a good 30 seconds to execute even when the query produces no results. There are 4000 lines within the database and queries that produce all results run within ...
1
vote
2answers
2k 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 ...
0
votes
0answers
32 views

MySQL - Harmonize multiple time ranges

I have the following problem with harmonizing multiple time ranges. Let's say I have the following data: |range_object_id | start_time | end_time | |-------------------+---...
0
votes
0answers
11 views

Things we can optimize when runnung TPC-H benchmark

I am a Graduate student running TPC-H benchmark on MYSQL 5.6 . I have EC2 instance M3 large instance with a Intel Xeon E5-2670 v2 , 7.5 GB memory and 2 vCPU. Can someone please suggest me what are ...
0
votes
2answers
5k views

query to select data between todays date as well as tomorrows date time upto specific time

I have database "raj" with table "pagination" In table pagination have "id", "actualtime" and "created" field id - auto_increment name- varchar created- datetime I want to display all rows which is ...
0
votes
0answers
19 views

Sql get results only containing all keywords

Let's say I have mysql table called SONGS, with columns: Artist | Featuredartist | Songname | Year What I need is to get Artist and Songname, only containing my keywords (and no matter how they are ...
2
votes
1answer
16 views

Howto implement correctly Businness Logic in database

I'm searching about how to disable triggers, and seems like it's not possible under MariaDB. My problem is, how to manage then, when you import data. I have a database where almost all business logic ...
1
vote
1answer
23 views

Multiple SELECT With Multiple WHERE

I am stumped and need your help. I am trying to select three columns from my table where one of them is a VARCHAR and the other two are either "Y" or "N". SELECT CurrencyPair, Count(Accepted) As ...
2
votes
2answers
31 views

SUM and Group By Optimization

I use this query: SELECT logdate, SUM(bytes)/1024/1024/1024 as traffic, customer FROM `Logdata` WHERE customer is not null AND logdate >= "2016-07-01" AND ...
0
votes
1answer
252 views

Can I split mysql the search results into two tables in php?

I have index tables with multiple columns: s | s1 | s2 | s3 | s4 | s5 | s6 | s7 | s8 | s9 | s10 | s11 | s12 | ------------------------------------------------------------------- 0 | 1 | 0 | 1 | 1 ...
0
votes
1answer
15 views

pt-table-checksum show wrong DIFF

I'm try to use pt-table-checksum tool. I have Master/Slave tables, and I add some rows to the slave to check it. pt-table-checksum --ignore-databases mysql S=/tmp/5.6.22_3306_Master/data/mysql.sock --...
3
votes
2answers
274 views

Avoiding Multiple Queries when Searching for Records Associated with a Set of Records

So, I am sure I have done something really stupid while designing this, and I'm open to schema changes if they'll really help me out. On to the problem: I have a custom shopping cart system (backed ...
0
votes
1answer
15 views

Trying to understand MySQL Replication with SSL

I'm trying to get my head around the use of SSL with MySQL replication. I've spent all day reading blog posts / articles about this, and I'm still no closer to getting an answer to this question: ...
3
votes
4answers
1k views

Avoiding MySQL Fabric to become a single point of failure

I managed to install and configure MySQL Fabric that manages multiple MySQL Server nodes. It works very well since I tested it by connecting to the Master node directly and played with the data (...
1
vote
1answer
299 views

What's the approach to figure out reason for mysql crash?

The database I'm using crashes a lot recently. And I can't find a decent way to dig into the issue. I looked into mysql error log, but don't know how to start. I know there was a "load data infile" ...
-3
votes
2answers
87 views

How do I find mismatches in two tables?

I have a database where I'm trying to find inconsistencies across two tables. I'm new to SQL and would like some help. The other questions I've looked up are confusing and too convoluted for what I'...
-1
votes
1answer
19 views

How can I create a church attendance report system?

Please am pretty new to php and mysql. I have an assignment to create a church attendance system for our weekly services. The system would be able to know how many males and females came to church ...
1
vote
1answer
15 views

best way for creating Index in mysql (multi-column/table)?

i have a big problem with my database.. I need a very fast query over 2 tables. 1. table: (node) ~42.500.000 entrys 2. table: (waynode ~51.200.000 entrys The following query is much to slow: ...
0
votes
1answer
215 views

Too much IO to MySQL InnoDB log files

I am using MySQL version: 5.5.38 I have dedicated HDD to InnoDB log files using innodb-log-group-home-dir option. atopsar -d 30 shows big load (>50%) to this HDD The thing is that I have only 75 ...
0
votes
1answer
119 views

want to import exported xml file in wamp phpmyadmin

I have exported single table from wamp phpmyadmin as xml file for data verification and want to import it again into database as mysql table. Please give me guidance, how its possible?
1
vote
1answer
159 views

MySQL very long-running queries

I have a quite large db (800+Mb dump file) that I imported to my local server. It's a Wordpress db from witch I need to extract certain posts. There are around 160,000 posts inside. Currently I'm ...
0
votes
1answer
166 views

Hash index for InnoDB

I saw a database schema that looked like this CREATE TABLE foo ( name_hash bigint, name varachar(500), a varchar(500), b varchar(500), ... PRIMARY KEY (name_hash), KEY ... ...
0
votes
0answers
9 views

Java Library to Dump MySQL Database to File [on hold]

I am looking for a Java library to embed into a Java web application to enable backup of a MySQL database to a zip file. The first question would be why not use MySQL dump, this is an option that we ...
0
votes
1answer
149 views

How to group records in mysql query

I have a table (user_access) with the following columns in mysql database id int user int access_time datetime I am trying to run a query that gives me the number of times users accesses ...