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
67 views

All queries are so slow on mysql NDB cluster

Here is my situation: I got over 10G of web logs (around 30 million rows) and I mainly search it with various conditions. e.g.: select * from tbl where ip = '123.123.12.3' and agent = '...
1
vote
1answer
25 views

Changing number of rows when importing table [duplicate]

I'm currently importing a table with about 17 million rows in MySQL. What catches my attention is, the number of row seems to be fluctuate. I used the command show table status while my importing ...
0
votes
1answer
35 views

Determining whether a MySQL column is ever used

How can I determine whether a particular column in a MySQL table is ever SELECTed or explicitly UPDATEd or INSERTed or referenced in a WHERE clause? It'd be nice if I could determine the db user who ...
1
vote
1answer
35 views

Mysql will no longer start after DB import and password change

I'm running Mysql5.6 on RHEL 7. I had managed to get the mysql service up and running, and imported a database into it with no issues. However, after attempting to reset a user's password, the ...
0
votes
1answer
67 views

How do I remove first line from text and only the first?

I have a tables "Table1" in this table I have a Text NOT null field - "value". the value field is populated like so: value: 1.2.3.4 [cookie] : butter - 1 cup. 1.2.3.4 [cookie] : flour - 2 ...
0
votes
1answer
45 views

MySQL .ibd file is too big

I got a memory issue while in linux. When i checked memory allocation by using df -h i found a path /dev/sda1 and it is used 100%. When i dig more i found that /var/lib/mysql file ate almost all ...
0
votes
0answers
38 views

Error creating foreign key on (check data types)

Very weird problem. I need help, I can't figure out and I don't know how to trace the specific errors in phpmyadmin. I have 2 tables and I want to create FK between them. The first table is keywords:...
0
votes
0answers
31 views

Replication after Master down in Master-Master schema in MySql

I have set up a Master to Master replication scheme. I have 2 Master server: server A and server B. Server A is configured as follow. my.ini server-id = 1 binlog_do_db = example log-bin=mysql-...
0
votes
1answer
42 views

Adding where clause in LEFT OUTER JOIN giving unexpected result

SELECT abc_discussions.id as id, abc_discussions.subject as subject, abc_todo_lists.title as todo_list_title, abc_todos.title as todo_title, abc_files.title as file_title, ...
0
votes
2answers
31 views

Can i Make Index for all columns(No write operations)?

Few days I just learned indexes.I my New app(running on node js) There will no write operation.And my server has 500mb of ram.Can I set Index to all of My column.I almost have 500K rows.My query is ...
0
votes
0answers
12 views

How do display the vertical format like MYSQL in the console, but for H2 Database?

I am administering a H2 database and I'm coming from the mysql world. I usually use the console to do quick queries in the mysql console. When there is alot of data returned, I use the \G option for ...
0
votes
1answer
43 views

Really slow join, limit and order_by query

I've got these two tables: books (about 2 million records in total) Containing a unique ID (isbn) aswell as an integer value representing popularity (index, but not unique). category_pointers (also ...
0
votes
1answer
56 views

I Need Help With My Database Design for Product Management

I'm designing a MySQL database and the front end for my work. The database will store all of the products that we sell on our marketplaces and their relevant data. We will be able to lookup products ...
1
vote
0answers
25 views

Question about MySQL triggers performance [duplicate]

I currently have a database that stores some transactions for several users, for example purchasing or selling products is stored as 1 entry in the transactions table. It can also store profits made ...
0
votes
0answers
21 views

With regards to an ms access to sql migration

I am aware there is lot of information on the web about how to migrate from an access database to a SQL one. However most of the tutorials are about moving from MS Access to MS SQL Server, what If I ...
1
vote
0answers
17 views

Mysql to MS SQL Migration and synchronization

Database migration from MySQL to MS SQL using SSMA tool is very nifty, however, I have one question around this. I have 2 MySQL Db's want to migrate to MS SQL, one sizes around 850 GB and another one ...
1
vote
1answer
35 views

Temporary file write failure on MySQL

When running an ALTER TABLE ... ADD COLUMN ... I get: Error Code : 1878 Message : Temporary file write failure. And on log_error (/DATA/mysql/.err) 2016-06-29 17:27:01 7f11f08a7700 InnoDB: ...
3
votes
1answer
40 views

FULLTEXT Search (InnoDB) - Am I doing it right?

Goal: I wish to do autocomplete using ~130K global city names. Setup: I have created a 'cities' table as follows: CREATE TABLE IF NOT EXISTS cities ( id INT(11) NOT NULL AUTO_INCREMENT, ...
0
votes
1answer
23 views

Is there a UI tool for moving data from two different tables?

The schemas in the two databases are different. Eg. Database 1 / users - id - name - phone Database 2 / users - id - first_name - mobile Is there a tool that lets me visually create the statements ...
1
vote
0answers
34 views

Do not want to allow Queries to take more than x minutes?

Do not want to allow Queries to take more than x minutes ! What System variable can I set to automatically terminate it.
1
vote
3answers
50 views

How do I prevent multiple row insert?

I set up a playground MySQL database for users and I'd like to prevent multiple row (large) inserts. That is, if there will be over N rows after INSERT operation, then raise an error and do not ...
1
vote
0answers
27 views

Retrieve data from OLTP MySQL to SQL Server DWH using SSIS

I'm running a BI solution currently reading data from an OLTP SQL Server 2008 to a SQL Server 2012 data warehouse. The ETL phase is implemented with SSIS and runs twice a day. This phase relies on a ...
0
votes
0answers
18 views

mysql needs a start after turning system off

Hii I am facing severe installation issues after installing Ubuntu 16.04. Mysql needs a start everytime system is turned ON. I have removed every available package of mysql 5.7 but after installation ...
0
votes
0answers
19 views

Tool like `pt-table-sync` for Amazon RDS

I am looking for a tool / script that does the same functionality as pt-table-sync in the Percona Toolkit, (i.e. sync two tables that are explicitly NOT in a master-slave setup) but is compatible with ...
1
vote
1answer
34 views

Sync two MySQL servers data, while changing the Engine in the slave

I'm running a MySQL server 5.5.44, and I'd need to sync its data to a new server running MySQL 5.7.13 using master-slave. The idea is to bring both DBs synced until we migrate to the second, newer ...
0
votes
1answer
23 views

Overwrote database with old mysql dump. How can I restore it with a more recent backup

Have a server with multiple databases. Imported wrong .sql from over the top of existing database. I Have a rsync copy of the up to date files for that database. What do I need to do to just ...
1
vote
0answers
29 views

MySQL max connections [closed]

MySQL keeps crashing, but after futher research, I found this error SQLSTATE[08004] [1040] Too many connections but I have this line #max_connections = 100 commented in my.cnf.
2
votes
0answers
28 views

Select rows based on latest date

This are the tables: Material (Code, ID) Itemtrans (IteID, FtrID, Tradecode) Fintrade (Ftrdate, ID) Material.ID=Itemtrans.IteID Itemtrans.FtrID=Fintrade.ID I want to list the last record on ...
-1
votes
2answers
86 views

SQL Text data type deprecated?

I have read that Microsoft SQL Server has deprecated the text data type in favour of varchar(max). PostGreSQL already allows varchar (without a length) as an alternative for text. The question is, ...
3
votes
1answer
55 views

Easiest way to duplicate rows

The closest I can find to what I want to do is here, but my inexperience gets me lost. Basically, I want to copy a number of records, change one column and insert them back into the same table (so its ...
-4
votes
1answer
74 views

How does indexes work in a database? [closed]

If I have a list of name that are all different and I have to find a specific name,how could indexes help.thi research?How does index work in a database?I have read other discussion but I haven't ...
3
votes
1answer
31 views

Issue with running multiple mysql commands in a bash for loop

I try to restore some .sql backups using a shell script with a for loop. I run by bash command.sh 'password' using the command.sh below. However, when I typed it out, it didn't run and instead, mysql ...
0
votes
1answer
35 views

Default privileges to execute function

I have a user that has select only access but was granted execute on a single function in our mysql db. The issues I'm running into is other more privileged users will drop and create this function ...
1
vote
0answers
16 views

log_bin_trust_function_creators deterministic always throws an error on server restart [duplicate]

Everytime my rackspace server restarts because of some maintenance or an outage, all of my mysql functions stop working due to this deterministic error. To fix this, I have to manually pull up the ...
0
votes
1answer
53 views

Set indexes for database used for login and register actions

I am thinking on how to set indexes to improve performance of a database for register and login actions.I have seen that alphabetical indexes are not good so I don't know how to do...Can you help me?...
7
votes
2answers
96 views

MySQL Innodb_row_lock_current_waits is 2^64 - 1

I have a MySQL 5.6 server which we monitor using Nagios. Over the weekend, it's started complaining about the Innodb_row_lock_current_waits, which currently has a value of 18446744073709551615, yes, ...
1
vote
0answers
22 views

MySQL keeps crashing

MySQL keeps crashing randomly - recent errors in error logs says this 160626 21:50:42 [Warning] IP address '113.108.21.*' could not be resolved: Name or service not known 160626 22:42:57 [Warning] IP ...
1
vote
1answer
33 views

Fail to connect from MySQL Workbench to remote server

After trying many different suggestions as found in the net, I'm still unable to establish a connection from the Workbench application to the server. Here is a brief list of things I tried: 1) ...
3
votes
4answers
85 views

Is mysqldump a “hot” backup kind?

I see in the documentation that the database backup tools are divided into four categories: hot backups, cold backups, physical backups and logical backups. I understand the the most important ...
1
vote
0answers
54 views

What exactly is MySQL Spin rounds per wait in SEMAPHORES section?

I am facing slowness issue on MySQL Slave. I am suspecting this due to OS I/O as i compared Spin rounds per wait values with PROD. Slave have higher values. Also slave has less resources compared to ...
1
vote
3answers
60 views

get datetime difference of a specific time and value of date time column

I have a datetime column in my mysql table. I need to get the difference between a definite time everyday say 12.00 pm and the value of that column.
1
vote
2answers
50 views

Why does my statement result in a syntax error?

I tried to run this SQL statement in MySQL 5.5 and 5.7.1 but always got error. DELIMITER // CREATE PROCEDURE one_off_update_user_info_view_type() BEGIN DECLARE @batchsize BIGINT DEFAULT 1; ...
1
vote
0answers
42 views

get max item in sub query join mysql

i have a table it contain buy of each user , other table contain a star ranking According to buys all user, my scenario very sample i create it and show in sqlfiddle . example if in table buy have ...
2
votes
0answers
56 views

Open source & cheap 'data at rest' encryption solutions

So I am exploring some options about database encryption. The best options are commercial (TDE). I am looking for an open-source implementation. Recent releases of MySQL and MariaDB have data-at-rest ...
1
vote
1answer
57 views

Remove result set doesnt meet criteria

this is part of a query result : I'm going to add a constrain to my query to remove the orders that doesnt have an invoice_type = final ,so first three rows should be removed and the second three ...
1
vote
1answer
20 views

Group by multiple column acquired from join

this is part of a query result : all three columns are user_ids acquired from multiple tables join . as you see each row has only one user_id and two other user_ids are necessarily null . I'm ...
1
vote
1answer
37 views

Simple Database Design - Many to many? - First database (newbie)

This is my first database I am designing. However I am getting confused on the many to many relationships. I have a products table, each product can have inventories in many different warehouses. So ...
2
votes
1answer
62 views

How to UPDATE by COUNT from JOINed tables

I have a schema as CREATE TABLE companies ( company_id int(11) NOT NULL AUTO_INCREMENT, company varchar(255), projects int(11), PRIMARY KEY(company_id) ) ENGINE=InnoDB CREATE TABLE employees ( ...
1
vote
0answers
15 views

Mysql multisource replication : on slave map masters dbname to something like mastername-originaldbname

I need to implement a mysql multisource replication using mysql >=5.7.11, there are already a certain number of mysql servers running which will become masters for the single slave which is going to ...
3
votes
2answers
68 views

Efficient schema to handle time interval queries on a huge table?

We have huge table (+10 millions rows) where we aggregate the values by a using a time interval search on a Datetime column. And right now, to build single page on our app, we are querying this table ...