MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
505 views

Simple MySQL table copy from one server to another?

this question has kindof been answered in a number of ways. Nothing that quite fits the bill (as far as I understand it). I have MySQL Table X on Server A. I would like an exact copy of this table, ...
0
votes
0answers
9 views

Deploy existing ms access file with forms as web application

We are using the following: a ms access file with local tables remote tables which are connected through the odbc connector to a external mysql database with many forms When using the ms access ...
0
votes
1answer
95 views

pt-table-checksum - Verify MySQL replication integrity

export/import: $ mysqldump -h6dhdbm01 -p clee2 users > 6dhdbm01-clee2.users.sql Enter password: $ echo $? 0 $ mysql clee2 < 6dhdbm01-clee2.users.sql $ echo $? 0 $ pt-table-checksum: $ ...
0
votes
2answers
25 views

mysql.sock not found on CentOS 7 machine

I am getting the following error when I try to log into mysql from the CentOS 7 terminal of the machine where mysql is installed: ERROR 2002 (HY000): Can't connect to local MySQL server through ...
0
votes
2answers
778 views

How to fix slow LIMIT queries with big offsets without heavily rewriting them?

Imagine a very basic example of your average discussion board. For example: CREATE TABLE threads ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(100), PRIMARY KEY (id) ) CREATE ...
0
votes
1answer
1k views

How to perform a while loop on the query result

I created a trigger AFTER an UPDATE of a column in a MySQL database. When the trigger detects a certain value, it should perform some actions. This is what I have at the moment and is working fine. ...
0
votes
2answers
172 views

mysql need help optimizing query

I have a table containing servers logs, and another table containing rules to match certain and drop them. The logs tables contains around 1 million rows, and there are about 20-30 rules. The ...
0
votes
1answer
25 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 ...
0
votes
1answer
46 views

GROUP BY Returning Different Totals [on hold]

I have two very similar queries that are returning different totals. The first query, where the total [of subscription_payment.price] is calculated with PHP (and verified in Excel), is the same query ...
0
votes
1answer
50 views

Can I lose data if I use InnoDB? [closed]

During a power failure, is it possible to lose data if I use InnoDB? I remember reading such things.
1
vote
2answers
972 views

ERROR 1166 (42000) at line 65203: Incorrect column name ''

I have a big snapshot database size is about 44GB in mydata.sql. When I run it overnight, it show this error message: $ mysql -u root < mydata.sql ERROR 1166 (42000) at line 65203: Incorrect ...
0
votes
1answer
112 views

Add partition works but not the drop partition

We have set an event as below. What we notice is that the add partition is working well as we can see on a daily basis the partition list is growing but the drop partition is not working well any ...
-1
votes
0answers
15 views

What is the difference between MySQL Innodb log files and MySQL binary logs? [duplicate]

I know that this question might sound a little dumb but I want to know exactly what is the difference between those 2. I know that the binary logs (log-bin variable) are used mostly for replication ...
-1
votes
2answers
92 views

Can you store PHP code in mysql database?

I'm creating a codex that will store example of functions and examples on how to use functions. Can I store this information in a database? Also, is there a proper way of displaying code on a page?
0
votes
1answer
4k views

Database user specified as a definer

I have a view in my database. problem is below Error SQL query: SELECT * FROM `lumiin_crm_prod`.`v_contact` LIMIT 1 ; MySQL said: 1449 - The user specified as a definer ('lumicrm'@'%') ...
1
vote
1answer
20 views

MySQL slave replication permission error

I am having a rather frustrating issue. I have granted replication client to a user on the slave instance of MySQL. I can login using the username and password. I can exectute "SHOW SLAVE STATUS;" but ...
0
votes
1answer
12 views

MySQL ORDER SELECT based on a score

I have a table 'member' and want to be able to search the table and order results by relevance. I have a single string to search on and want to search multiple fields. Example, given_name and ...
0
votes
1answer
18 views

How to generate unique Auto increament id field across multiple data centers

I have multiple mysql servers deployed in three different data centers. Now my database has few tables with Auto increment id column. I want these columns in all three data center must have unique id ...
0
votes
0answers
21 views

Slow queries while using views in MySQL

We have MyISAM tables on MySQL 5.5 and there is this select * from theView where serial_number = 'QWE12345' or select * from theView where user_id = 1234 kind of queries when searching. When I ...
0
votes
1answer
173 views

MySql - is possible that performance issues are caused by dynamic SQL?

We have this MySQL SP, which uses dynamic SQL. It seems it does NOT perform well under load. It is possible that this SP becomes slow under load because it uses dynamic SQL? Can dynamic SQL cause ...
0
votes
2answers
20 views

How do I figure out what is consuming space in my Zenoss DB (mysql)

I have been running Zenoss 4.2 and the filesystem has never exceeded 20gb. In the past 3 days it has shot up to 90gb and I am almost out of disk space. It appears the used space is all in ...
0
votes
2answers
430 views

Can't get mysql running

After canceling an Ubuntu upgrade, Mysql refuses to start. this is what I get when I try to run it : $ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket ...
0
votes
0answers
20 views

mysql replication not working [closed]

I have a problem with mysql replication which I've set up almost 2 month ago .. Here are the snapshots from phpmyadmin : http://i.snag.gy/xrEzW.jpg http:/i.snag.gy/Pa0Uo.jpg ( first problem ...
5
votes
2answers
4k views

Taking mysql dump from another machine

I have MySql db on Machine A , I have Mysql credentials. And accessing this MySQL from machine B which I have crdential's. But I couldn't take mysqldump from Machine B. Please help me. Both ae Linux ...
0
votes
0answers
16 views

UPDATE & DELETE multiple rows with an array for the id

I wan't to check for challenges a user's team posted that have not been excepted after 1 day, then autorefund the user's team back there credits, and then also delete all the challenges. So far here ...
1
vote
3answers
41 views

How i can export just structure of mysql database

I use ubuntu 14.10 Phpmyadmin I have ''big'' mysql database, 900mb, I need just structure of this database, how i can export just database structure/empty database without remove data or download ...
0
votes
0answers
15 views

How to configure Mysql database for highavailability and failover? [duplicate]

I have a web application written in java with Mysql database. I want to ensure high availability of my database server, hence i have configured master-slave replication mode. All my reads goes to ...
1
vote
2answers
2k views

Error while importing a “.sql” file in database

I am trying to import a .sql file in to my local database. whenever i type the command to import the file, I get an error ERROR at line 1: Unknown command '\S'. This is the first line of the sql file ...
2
votes
1answer
181 views

MySQL server connections capped at 1013

For the last few days I've been trying to figure out why my MySQL read slave servers are capped at 1012+1 (+1 for the superuser) connections when I have the max_connections set to 5000. It seems that ...
0
votes
0answers
14 views

ERROR 2013 (HY000) When long string data managed

This is my first question on this community, I'll explain the situation: I have a server with PHP and Mysql on it, on that server I have a wordpress blog. Lately i've been receiving a lot of spam ...
0
votes
2answers
134 views

Dealing with data stored as arrays in a MySQL DB

So I know storing arrays in a DB field is wrong and would never do it myself, however a 3rd party plugin my company is using stores data in an array and I was wondering if you could help me try to ...
2
votes
1answer
179 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 ...
1
vote
1answer
99 views

Query does not use index (according to EXPLAIN SELECT)

Can anyone give me an indication, why this query does not use the Key on the table 'gtg'): ...
0
votes
1answer
15 views

Could not start mysql or MariaDB. Permissions were ok, but mysql-bin.index permission error

Using MariaDB 5.5.36. Here's what I got while trying to start MariaDB: # syslog Dec 14 09:40:52 vps1497 mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql Dec 14 09:40:52 vps1497 ...
0
votes
0answers
4 views

Points/Scores display from and to the Database in Android app

I am an absolute beginner to the Android programming and I am trying to develop an Android application using Eclipse where user is able to login/register and is able to see his "white" points based on ...
0
votes
0answers
11 views

Building an economic time series database with aggregation/dis-aggregation capabilities

I am trying to build a database in MySQL and MS Access that contains economic indicators and financial time series. Initially, I wanted to solve the problem by setting up a table for each major ...
0
votes
1answer
259 views

Restoring Mysql Table From ibdata1, ib_logfile0, ib_logfile1 (without frm)

How to recover an innodb table that only left with ibdata, ib_logfile0 and ib_logfile1 without any frm file? Thanks
0
votes
2answers
114 views

Do I need to reindex mysql table after bulk delete?

I have a table in MySQL with a lot of INSERT and SELECT at every second. And there is a bulk delete of some older data once in a day. Do I need to reindex the table after delete? I want to increase ...
3
votes
1answer
2k views

MySQL: Lock wait timeout exceeded

I have a developer that has been trying to alter a large table (~60M rows). Via LiquidBase/JDBC they're running ALTER TABLE foo DROP FOREIGN KEY fk_foo_1; Today while it was running I checked in ...
0
votes
2answers
471 views

mySQL Optimization Suggestions

I'm trying to optimize our mySQL configuration for our large Magento website. The reason I believe that mySQL needs to be configured further is because New Relic has shown that our SELECT queries are ...
0
votes
0answers
18 views

Database design for price comparison site - too complex?

I'm working on a regular price comparison site with two exceptions. I want to show price history and also allow users to subscribe to a product with a specific size and color. As a result, I've ended ...
-1
votes
1answer
46 views

what is the syntax for insert trigger?

I am very new to sql. feel a little stupid to ask this question Say I have this table Warehouse(shipperid, name , state). Then I define another table warehouse_maine (shipperid, name, state) which ...
0
votes
1answer
120 views

Transfer all read request to Slave in Master-Slave MySQL

I have configured master slave on my system (MYSQL). Now, is there is any script or way available or possible to transfer all read request to SLAVE. So, let me make my question here more clear. I ...
2
votes
1answer
342 views

Alter mysql database engine doesn't work from cluster to other

I got into this issue when I tried to alter my database table engine to InnoDB from ndbcluster, It did not work. But When I changed engine from InnoDB to ndbcluster it worked. It did not throw any ...
1
vote
1answer
49 views

DELETE seems to hang

The following command: DELETE FROM hours WHERE id IN (SELECT id FROM holdkey WHERE persons_id=60) seems to hang indefinitely. However, the corresponding SELECT * command completes in a fraction of ...
0
votes
3answers
358 views

Mysql - How to Optimize Retrieval Time in a Table

I have query like this! which has 200 million Records in a single table.. I am using BTree Indexes in my table... mysql> select COUNT(DISTINCT id) from [tablename] where [columname] >=3; ...
1
vote
1answer
36 views

Database structure (MySQL)

I have a database called data that is going to contain some data about writers, books and images. I've created these tables so far, but I don't know how to struct the images table. A writer or book ...
0
votes
2answers
573 views

MySQL - HOWTO speed up slave replication on large database / Quickly spawn slave?

We have a large mysql database (about 100GB on disk) that we would like to spawn a slave for. Our typical process for creating a slave is: Create a slave server Load in a mysql dump of the master ...
2
votes
2answers
145 views

Queryplan changes depending on filter values

I created a clustered index on a table expecting it to make the queries with ranges perform better, but, different values in the where clause can produce differente query plans, one uses the clustered ...
3
votes
2answers
168 views

Problem in Fetching Result set in Desired Format

I have 2 tables having the following columns Person ------ person_id, first_name, middle_name, last_name Items ----- person_item_id, person_id, item_type, status, ordered_date The query is ...