MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

2
votes
0answers
3k views

'Access Denied' in MySQL on AWS RDS

I'm trying to use an ETL (in my current case, the free version of Talend). I've successfully set up a MySQL on Amazon RDS, logged in through the MySQL Workbench for Mac, and uploaded my company's ...
1
vote
1answer
904 views

Does TRANSACTION/COMMIT/ROLLBACK only work on certain MySQL engines such as InnoDB?

Are transaction functions only relevant for particular database engines on MySQL, or are transactions supported under all MySQL engines, including MyISAM and InnoDB? someone says here that ...
2
votes
1answer
1k views

ERROR 1005 (HY000): Can't create table 'phact_greenland.cache' (errno: 121)

I get an error when I try to create a table: ERROR 1005 (HY000): Can't create table 'phact_greenland.cache' (errno: 121) CREATE TABLE IF NOT EXISTS `cache` ( `cid` varchar(255) NOT NULL ...
3
votes
1answer
877 views

InnoDB “corruption”

I use: 5.1.63-0ubuntu0.11.10.1 Apache/2.2.20 (Ubuntu) MySQL client version: 5.1.63 The system is continuously displaying the following error during reading data from a MySQL database: ...
2
votes
1answer
275 views

How do I switch master with slave and vice versa on MySQL?

I have two instances of MySQL, one master and one slave. How can I switch them to make the slave the master and vice-versa while avoiding downtime?
7
votes
2answers
16k views

What is the Best Way to create MySQL Master-Slave Replication Setup and Troubleshoot it?

I am very new to Database Administration. I face a lot of problems while setting up mysql master-slave replication. I also face regular mysql replication troubleshooting issues. Can anybody helps ...
2
votes
5answers
260 views

How to shard 14 gb of data for archival database?

We have 14 GB worth of CSV's containing product information, with each CSV being all the records for a US state. We now want to store this in a database. There would be ~130 million records. The ...
1
vote
1answer
185 views

Are these custom module Drupal tables lacking foreign keys? mysqldump with table structures without data is included

I am troubleshooting a some tables in MySQL used by a custom Drupal module. Documentation for these tables is poor so I used mysqldump to get the structures in the Drupal database without the data. I ...
1
vote
0answers
96 views

How to profile individual queries using PERFORMANCE_SCHEMA

I've been looking at SHOW PROFILES, which seems ideal for what I am doing. However, I've noticed a warning that SHOW PROFILES is being deprecated and that PERFORMANCE_SCHEMA should be used instead. ...
1
vote
1answer
121 views

How to get non-deleted messages for one user_id if the same user_id appears in two tables at same time?

I'm trying to get non-deleted (deleted = 0) messages for one user_id if the same user_id appears in two tables at same time, but something is wrong because I am not getting the correct or expected ...
4
votes
1answer
6k views

SELECT LIMIT 1 per column value?

Lets say I have the following table ----------------------------- | user_id | comment | ----------------------------- | 2 | thats cool | | 2 | awesome | | 3 | ...
1
vote
1answer
214 views

Sudden MySQL connection issue

We have almost 60 network guys working via a proxy server, developing on one Linux-based in-house server. Suddenly, it is saying to everyone: Warning: mysql_connect() [function.mysql-connect]: Too ...
4
votes
1answer
3k views

Is Percona xtrabackup the right choice for my 500GB MySQL backup?

I have a MySQL db with 500GB, consisting mainly of Innodb tables, and one big (200GB) MyISAM table. My current backup strategy is copying the db files to an external harddrive. This causes a downtime ...
2
votes
1answer
2k views

Slave I/O thread dies very often

I have MySQL Replication working between two servers in master-master mode. Replication has been working from day 1. The IO Thread and the SQL Thread has never died. However, the Slave SQL thread ...
2
votes
1answer
1k views

shopping cart database schema

I need help creating the schema for a database to hold information relative to a web user's shopping cart/session. Each session will have a session ID, a time stamp holding time of creation, an expiry ...
2
votes
1answer
3k views

MySQL / InnoDB: Does daily optimization improve performance?

Would performing daily optimizations of tables increase performance for MySQL and InnoDB? I have never did this before, but I have seen this module for Drupal http://drupal.org/project/db_maintenance, ...
1
vote
1answer
992 views

mysql show processlist hanging processes;

We needed to move services from one co-location patner to another so we had to copy some files from main server to back up server so these services can now be run on back up server at the new ...
0
votes
2answers
2k views

MySQL how to release memory used up by SELECT

I executed an INSERT IGNORE combined with SELECT from large table. The SELECT took up 16GB of memory and went into SWAP before I terminated it with CTRL+C. INSERT IGNORE INTO sid(sid) SELECT sid ...
4
votes
1answer
3k views

Suddenly have to rebuild indexes to prevent site from going down

I have been having this problem for a while: http://stackoverflow.com/questions/7770695/mysql-query-slow-until-reindex-column It seems all is good and when I suddenly get a lot of writes to the table ...
2
votes
2answers
2k views

mysql 5.5 corrupt - missing temporary table

One of our mysql instances crashed and failed to start: 120422 10:04:13 InnoDB: Error: trying to open a table, but could not InnoDB: open the tablespace file './databasename/#sql-29f6_45.ibd'! ...
1
vote
1answer
1k views

MySQL flush logs, unknown error

I gave been trying to solve this for few days now, and cant seem to figure this out. I have been trying to set log rotation for mysql slow using linux logrotate feature, and my script seems to get ...
2
votes
1answer
1k views

SQL Query - Set Date Variable by Table/Column Reference

How do I set the @DATE variable by using a table/column reference? Right now I've set it manually as you can see below with the opening: SET @DATE = '2012-03-31 01:00:00'; The table from which I ...
1
vote
1answer
2k views

MYSQL Social Networking website - Database Design, Data Growth and Hardware

Introduction I have a system around one million users (community based). It has around 6000 groups (fixed , no change). But there is no discussion board for these groups yet. Building discussion ...
1
vote
3answers
425 views

Mysql error while creating FK

here is structure of both tables category table CREATE TABLE category ( `catID` bigint(20) NOT NULL AUTO_INCREMENT, `title` varchar(60) NOT NULL, `created_at` timestamp NOT NULL DEFAULT ...
1
vote
1answer
452 views

Merge 2 tables and fetch data one by one

I have two tables: product & offers. products has (prod_id, category_id, prod_name, brand, price, status) offers has (offer_id, prod_id, offer_type, discount_amt, validity) I want to display ...
1
vote
1answer
1k views

procedure is not executing

Problem I am getting when I execute this proc: call `sp_frm4_px_prc_calc`(); Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version ...
2
votes
0answers
77 views

MySQL Partioning: Is there a performance tradeoff between number of partitions and size of each partition?

I have a large table (several 100 million rows) that I would like to efficiently partition. My question is whether there is a tradeoff between partition size and number of partitions. As far as I ...
2
votes
1answer
2k views

MySQL 5.5 Runs Out of Memory, Drops All Connections When Creating Many Databases

I'm running into a problem when I create a large number of databases consecutively on an Amazon RDS db.m1.large instance. The MySQL Engine Version is 5.5.23. At some point, the RDS instance drops all ...
3
votes
1answer
205 views

Economic Database Architecture Possibilities w/ Data of Varying Length

I'm in the process of designing a MySQL database (InnoDB) that holds a large amount of economic data which our application scores. The size of the economic data varies a great deal: some measures, ...
1
vote
2answers
2k views

Mysql giving only 25 inserts per second

I'm using ubuntu 12.04 LTS Processor : Pentium(R) Dual-Core CPU E5200 @ 2.50GHz × 2 OS Type : 64-bit Memory : 3.9 GiB Disk : 101.1 GB I installed mysql and wanted to test insert performance. Here is ...
3
votes
1answer
116 views

Slow MySQL query, not sure why

I'm working with an intranet application for property tax collection, and I've hit a snag. The following view runs much slower than I'd expect: create or replace view propertytaxessub0 as select ...
3
votes
3answers
337 views

Is this database fine for calculation?

I am doing an application called as Invoice Application.For that I have my database is like this. Now my problem comes when I am taking the tax part in my database.As I have made tax as an option ...
1
vote
0answers
153 views

How can I force myisamchk to modify the original data file in case of duplicate keys?

In the documentation for myisamchk, it says: --quick, -q Achieve a faster repair by modifying only the index file, not the data file. You can specify this option twice to force myisamchk to ...
1
vote
1answer
834 views

MySQL Master-Slave Replication Cross Database

I am setting up Replication for cross Database as i have set 2 variables in Slave' s my.cnf as replicate-do-db=database_name and Replicate-wild-do-table=database_name.% ,But i am not able to get ...
2
votes
2answers
2k views

MySQL cluster - how many hosts are needed for full HA?

I need some clarification on MySQL-Cluster (NDB) setup I want to achieve full HA but I'm low on server budget and can't afford to rent a dozen of servers for simple solution that I'm working on. ...
0
votes
1answer
408 views

Stored procedure arguments get immediately truncated

I have a stored procedure with a single SELECT statement inside: DROP PROCEDURE `pos_neg_test`// CREATE PROCEDURE `pos_neg_test`(IN start_ts TIMESTAMP, IN end_ts TIMESTAMP) BEGIN SELECT ...
4
votes
2answers
4k views

MySQL Database Schema for Train Timetables

I am interested in what a MySQL database schema would look like for a train timetable. Generally this is presented in table format as the final result. Train No. 11111 22222 11111 Train Day ...
1
vote
1answer
404 views

What is the underlying representation of BLOB data when I export it?

When I export a blob object to an SQL file, I get some thing like this for a blob field: 0x4f3a383a227374644....., Questions I would like to know how the BLOB is actually converted to the above ...
1
vote
2answers
2k views

Similar function NOWAIT in MySQL

Select for update nowait doesn't work in MySQL 5x (innodb). Is there any function like NOWAIT in MySQL?
-1
votes
1answer
2k views

My master to slave replication stopped and is showing this error when I use SHOW SLAVE STATUS;

My master to slave replication stopped and is showing this error when I use SHOW SLAVE STATUS; | Waiting for master to send event | 172.16.10.37 | repl | 3306 | 60 | mysql-bin.000256 | ...
2
votes
1answer
908 views

Find which numbers in [1, 161] are not in the result set?

How to find which two number in [1, 161] is not in the result set? Can I find this two numbers using sql command? mysql> select blog_id from wp_blogs; ... | 149 | | 150 | | 151 | | ...
2
votes
1answer
4k views

execute() vs executeQuery() in MySQL Connector C++

With MySQL Connector C++, I can use the sql::Statement::execute() function if I am going to modify the database (INSERT, UPDATE, DELETE, MERGE), or the sql::Statement::executeQuery() function if I am ...
0
votes
1answer
3k views

Print table documentation with comments?

I have a MySQL database, and I have used MySQL Workbench to insert text into the "comment" fields of many of the columns and tables; the plan was to have the documentation stored in the database. ...
1
vote
1answer
133 views

Is MySQL replication suitable for a Write Mostly application?

I'm considering adding another server to my one-server setup application with 600GB MySQL DB. The db and the apache are both running from the same server. In order to avoid backup downtime and improve ...
2
votes
2answers
571 views

mysql myisamchk vs mysqlcheck

We have a mysql database running version 5.0. Every month we shutdown the database for maintenance. We run a myisamchk on the tables to fix data fragmentation, and this takes down the system for up to ...
1
vote
1answer
2k views

How do I perform a UNION query on a dynamic list of tables?

My database has an unknown amount of tables, named with the same prefix followed by a random string: _ct_<random_string>. Each of these tables has the same data structure. I also have another ...
4
votes
1answer
8k views

How To Optimize and Repair InnoDB tables? ALTER and OPTIMIZE table failed

I just switched my Wordpress databases to use the InnoDB engine. When using MyISAM, I used to run Optimize and Repair table. However, with InnoDB, these don't work. I manually ran OPTIMIZE TABLE ...
5
votes
1answer
4k views

How do I reduce the database size on AWS RDS MySQL?

I have an RDS MySQL database on Amazon Web Services. I want to reduce the size of the database in the control panel in order to save money. Q: How do I make it smaller? Their site says you have to ...
2
votes
0answers
945 views

MySQL Server hitting 100% unexpectedly (Amazon AWS RDS)

We've been struggling with this issue for months. This week we upped our RDS instance to the highest performing instance and although the occurrences have reduced, we're still seeing our database ...
5
votes
3answers
10k views

Resolving issue with mysql.proc after upgrading MySQL from 5.0.* to 5.1.*

Like many others, we upgraded our instance of MySQL from 5.0.* to 5.1.49. Since then, we've been running into an error that repeats itself when we perform certain actions: Attempting to view or run ...