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
30 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 ...
1
vote
1answer
1k views

phpMyAdmin Error After Upgrade to 3.5.8.1

Im Nubie in mysql, I use that only for PHP. to the point, I try to upgrade myphpadmin 3.5.8.1, after I that, I cant accses my database and have error like This: #1064 - You have an error in your ...
1
vote
1answer
159 views

Fastest engine for Mass Updates (only updates done on table)

I have a table of 2 columns and 60 million rows. I want to update the table by incrementing one field by 1 on various different rows (This is the only type of operation that will ever be done on the ...
0
votes
1answer
20 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
1answer
375 views

Quickly establishing if a remote MySQL connection is valid using PHP

I have a hosted website (Namecheap Pro shared hosting) that connects to a remote MySQL database using a read-only user privilege. This remote DB is updated by a separate system. The website works ...
-4
votes
1answer
67 views

How does indexes work in a database? [on hold]

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 ...
0
votes
0answers
142 views

How to generate a script with DDL differences between two databases? [on hold]

I have deployed a MySQL database into Production. As I work on the next release of software I am making changes to a test database. I now need to update our Production system without losing the data ...
4
votes
1answer
98 views

MySQL locking in Duplicate Key Error

From the docs: If a duplicate-key error occurs, a shared lock on the duplicate index record is set. This use of a shared lock can result in deadlock should there be multiple sessions trying to ...
0
votes
1answer
514 views

How to check mysql password change and other events logs

Recently someone change my phpmyadmin password and drop database I think it was sql injecting. Now I want to find information about this like when, how and who change my password Please tell me ...
1
vote
0answers
25 views

MySQL max connections [on hold]

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.
3
votes
1answer
50 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 ...
0
votes
1answer
1k views

GRANT EXECUTE ON PROCEDURE unable to USE database

I am attempting to grant a user execute privileges to a single stored procedure without any other privileges in a MySQL 5.1.45 instance. The stored procedure is defined with SQL SECURITY as DEFINER. ...
2
votes
0answers
25 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 ...
0
votes
1answer
120 views

What to do when I get “mysqld dead but subsys locked” in my amazon ec2 micro instance?

I have an Amazon ec2 micro instance that holds a WordPress site. Since yesterday, my mysql db keep crashing saying: [ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo service mysqld status mysqld dead but subsys ...
-2
votes
2answers
65 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, ...
1
vote
1answer
124 views

MySQL After Update Trigger apparently not running

I have the following After Update trigger on a MySQL table: CREATE DEFINER = 'root'@'localhost' TRIGGER phpbb_rathermenacing.phpbb_bbdkp_memberlist_AUPD AFTER UPDATE ON ...
-1
votes
1answer
21 views

Recommended Hardware for a MySQL Product Data Management Database? [on hold]

I have searched around and have yet to find an actual answer. Just "It depends on the number of records etc.." I am designing and developing a database application for work that is supposed to keep ...
5
votes
4answers
4k views

Ansible: How to change MySQL server root password by reprovisioning the server

I have provisioned my server with Ansible playbook. I've used the root/bedrock-Ansible playbook. One of the tasks was to set up mysql server together with mysql root user password. Now I urgently ...
0
votes
1answer
1k views

Cannot Start mySQL Daemon with Error “mysqld from pid file … ended”

I cannot get MySQL to run. It was working just fine hours ago, but upon starting, repeatedly ends without telling me very much. Here are my logs [myusername@location ~/mysql]$ ./bin/mysqld_safe --log-...
0
votes
1answer
40 views

Grouping Based on Column Consecutive Values

I have table with let say the below 3 columns Date OfferId Title 4/29/16 - 5/19/16 123 title1 5/20/16 - 5/30/16 123 title2 5/31/16 - ...
0
votes
1answer
549 views

Restrict access to rows by usename

In my database i store data of different users (e.g. addresses or invoices) in the corresponding tables. I want to make sure that a logged in user only has access to it's own data in the tables (so ...
0
votes
1answer
27 views

My SQL Server Upgrade from 5.6.12 to 5.6.22

I have a MySQL Server 5.6.12. I have this server as a windows service. When i upgraded this, i did the following. I stopped the service I copied 5.6.22 server folder, removed the data folder. From ...
0
votes
1answer
35 views

In which cases is a full table scan preferable to an index scan with low cardinality?

Are there real-world scenarios where to perform a FTS is preferable to scanning an index with very low cardinality? Why would MySQL do so? Doesn't an index scan always involve reading less data (...
1
vote
1answer
237 views

MySQL query to create a Matrix view using pivot

I have a table with the following fields: p1 p2 s1 s2 where p1 -> player1, p2 -> player2, s1 -> game1, s2 -> game2 The number of players can vary from 3 - 10. The table have the results between ...
0
votes
1answer
425 views

MySQL Entity Relationship Problem - 3-way join table?

This is a db relationship question. I have a scenario which I believe I have come up with a solution - however, I can't be sure it's a manageable one, or even correct. The scenario is as follows: ...
1
vote
1answer
396 views

compare results between two select queries mysql

i'm making test application where users will input their select queries in input box and the application have to compare them if they are identical with "correct answer" query. "Correct answer" query ...
0
votes
1answer
303 views

Debugging lock time out with show engine innodb status

I am keeping getting this lock wait time out. Below is my current settings. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to ...
3
votes
1answer
24 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 ...
1
vote
3answers
698 views

Why does this procedure raise a privilege error?

I am having trouble getting the following procedure to run on a remote MySQL database - the given error is privilege based (#1227). Locally, the procedure runs fine. QUESTIONS Could somebody help ...
1
vote
1answer
166 views

Benefits of using prepared statements in stored procedures?

Except from helping avoid SQL injection, what are the benefits - if any - of using prepared statements inside a store procedure (assume query is only executed once in the procedure)? Does the engine ...
0
votes
1answer
109 views

How to group by continuous days in mysql

I have table where I am storing some sequential data that indicate occurrences of some event given day. id from_id to_id date 1 2 1 2014-08-01 2 2 ...
0
votes
2answers
66 views

Queries per second avg

I have Installed MySQL Server 5.6.23 on Centos server and the configuration of the server is 16 GB RAM 8 Core CPU op-mode(s): 32-bit, 64-bit When I check the status of the server it is showing me ...
0
votes
0answers
37 views

DBMS comparison [on hold]

I am interested in getting to know differences in some of the DBM systems. I am mainly thinking of MS SQL, PostgreSQL and mySQL, but am also willing to dig into some other DBM systems, like Oracle. ...
0
votes
1answer
118 views

InnoDB compression: memory usage

InnoDB offers table compression for Barracuda-type tables and the recommendation seems to be to "adjust" buffer_pool_size. The documentation is rather vague about the definite impact of compression on ...
5
votes
1answer
149 views

Find Shoe Size Selection

I'm developing a feature that allows users to input their foot dimensions and have the proper shoe size returned to them. I'm having difficulty deciding on the best way to implement this feature. The ...
1
vote
0answers
15 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 ...
2
votes
1answer
60 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
1answer
35 views

How to restore MySQL databases from database files?

Our MySQL on Ubuntu 15.04 stopped working after we moved the computer to a new location and kept giving the missing socket file error. We couldn't really fix it after trying sudo apt-get install -f ...
2
votes
2answers
71 views

In MySQL, how exactly does data flows from query to disk?

I would like to have clarity on how exactly data flows from the the time of firing a query till it goes to disk. (I have rough idea it will go to buffers, then to redo logs then disk files) but then ...
2
votes
1answer
310 views

InnoDB internals - checkpoint, LSN, dirty pages

I'm looking into InnoDB internals regarding buffer pool, checkpoint and dirtypage. However there isn't enough information to answer my question. When I run show global status, I can get ...
2
votes
1answer
39 views

Wordpress using varchar(255) for index with InnoDB and utf8mb4_unicode_ci?

I'm trying to learn a bit more about the details of proper database construction and ran across something that confuses me. In a current Wordpress installation, I'm finding varchar fields used for ...
0
votes
1answer
130 views

Cannot set character_set_database and character_set_server to utf8mb4

I'm trying to convert my MySQL server and its already existing schemas to the utf8mb4 character set. Preliminary Notes: I'm using Xampp (with MySQL 5.6.24). Default options are read from the ...
1
vote
2answers
40 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
1answer
48 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 ...
0
votes
2answers
854 views

MYSQL Row Count Limits?

What is the maximum row count for a table in MYSQL? I have a system with around 600,000,000 rows in three tables. Average Data Length (from data_length column) for these tables is 58,000,000,000 ...
0
votes
1answer
43 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?...
0
votes
1answer
117 views

Want to create partitions of a MySQL table and change the charset of new partitions

I have a database table which contains large amount of data. I have written a script to create new partitions every week and drop old partitions (which are of no use). Currently, I have a column in ...
0
votes
1answer
134 views

Update records that match like regex from another table

I have two tables - ProductCategories and Products ProductCategories --- productid categoryid 1 2 3 4 Products -------- productid productname 1 Apple 2 ...
3
votes
2answers
60 views

MySQL Online DDL Index Creation

I have a table with 25 million records and 10 columns on which I am trying to create indexes. According to the following documentation no table copy should occur but when I monitor disk usage it is ...
0
votes
2answers
7k views

MySQL shutdown unexpectedly

2013-09-09 10:21:44 5776 [Note] Plugin 'FEDERATED' is disabled. 2013-09-09 10:21:44 1624 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future ...