Tagged Questions

I have two MySQL databases that are for Wordpress websites. One db is for a live version of a site, the second is a copy of the original that is used in conjunction with a copy of the original site. ...

I am pretty much a beginner having only created a few small php web applications relying on a MySQL database. I am now working on a somewhat larger project. I am in the planning stages of setting up ...

I have a menu, from where every item ordered is stored in a row. For a single order, there can be multiple rows.What I want is that when I display it, for same order_number ( number) all rows data is ...

I've been experimenting with mysql 5.7's feature to backup multiple sources to a single slave, but have legacy db's on source servers where I'm not sure if upgrading to 5.7 will break things, and also ...

This is from one of our Slave servers in a master-slave replication setup. What could be causing the locak mentioned in the 2nd line? Under info it shows only NULL. And it does not have anymore info ...

We have a database table and we found a weird query from old code. We can't really explain it, so we decided to analyze why it could have been done that way. The weird thing is that the results are ...

I keep my history records in one table and my pertinent data in another. I want to grab only the files from myfiles that currently have a given status recorded in statuses (ie, the latest status is ...

Does the INTO keyword only makes the query more readable, or does it bring another benefits as well? The queries beneath both seem to run equivalently .
insert ignore
tbl (type, details)
values ('1', ...

We've upgraded to MySQL 5.6 and start seeing the loading of db server increased significantly, and finally found out the query_cache_type is defaulted to off start from 5.6.
We enabled it again and ...

I am building a website on MySQL with php, and I have 400+ products in a table. I have three columns with comma separated values, each has 1-3 values separated by commas in each row.
I was wondering ...

I want to select the latest record of each hour in a given date, based on the datetime column 'reading_on' in my table , what is the best way to do it. I already tried group by HOUR(reading_on) with ...

I have migrated my Database from Windows to Linux server. In many places, query has been written without focusing their cases (uppercase / lowercase). So, these queries are not getting executed and ...

I have an index called source with cardinality of 1122 and a second index called state with cardinality of 22. MySQL keeps using the state index when when query SELECT C1 FROM tbl WHERE source = 'x' ...

I have a MySQL server that serves a couple of databases including a Magento e-commerce store.
We have been suffering with corruption in the ibdata1 file for a while, but it has now reached a critical ...

I recently changed the default port(3306) to another for mysql.
I did it by changing the my.ini file and did restart of the server.
No other changes were made whatsoever.
When connecting using a GUI ...

I have to select only first column. Because of i dont want to select all columns like SELECT * FROM table. But my first columns may vary like following:
id
article_id
user_id
product_id
page_id
etc..
...