MySQL version 5.5 - please also tag with mysql for search purposes.

learn more… | top users | synonyms

0
votes
0answers
20 views

Database design: history - transactions, states, durations?

I have not delved into this type of db info before, and it seems foreign to me what I need to do. So I would ask if this seems familiar to you, and is there a way this is generally done? (And would ...
1
vote
0answers
75 views

Proper database configuration

I'm running MySQL 5.5 on Debian 7.8. My entire DB is 2200 MB large (all tables are InnoDB), the mysql process is taking up to 6G RAM but still I think that not evrything is loaded in RAM I have large ...
0
votes
0answers
157 views

MySQL Load XML Infile with dynamic file name

I have a shell script which loops through a folder and picks up a set of files in turn. I then pass the filename to a .sql script so that the file can be imported into my database. BUT, I can't for ...
0
votes
1answer
295 views

MySQL starts using > 90% of CPU, “Copying to tmp table on disk” and “converting HEAP to MyISAM”

I have a server where MySQL is periodically taking up 11 of the 12 CPU cores. Once this starts it doesn't end until I restart MySQL. At least, I haven't let it run like this for more than a half hour ...
0
votes
1answer
8k views

MySQL slave stuck in “Reading event from the relay log”?

5.5.28-log MySQL Community Server (GPL) by Remi binlog-format=MIXED My problem is similar to this question. *************************** 2. row *************************** Id: 973415 User: ...
4
votes
1answer
324 views

MySQL Write performance bottleneck

We are trying to diagnose a MySQL Bottleneck, specifically for data writes. Basically, we have a single process that picks files from a folder and load into a MySQL table X using LOAD DATA CONCURRENT ...
1
vote
1answer
32 views

MySql - How to monitor the amount of reads/writes to the DB

Is there a way to fetch the amount of reads / writes made to the entire DB (MySql) in a given period, e.g. the amount of read / writes in the last hour?
0
votes
1answer
33 views

Create SQL Query in function or PROCEDURE

I am trying to create function inside MySQL to create several queries for example : DELIMITER | CREATE PROCEDURE queryBuilder(_tableName varchar(100)) BEGIN SET @str_query = '...
2
votes
0answers
46 views

Database Architecture & Design

I am building a web application for project management which will be hosted on my servers. My application design is like this 1 - user register 2 - domain name will be created i.e abc....
0
votes
0answers
22 views

Migrating a DB of mysql 5.0 to 5.5

Sorry this is a newbie question. I have a DB of mysql 5.0 on a shared host and I would like to migrate this DB to another mysql server (5.5) on another shared host. What I did is like this. ...
2
votes
1answer
1k views

How to set unique columns combination

see this table: CREATE TABLE IF NOT EXISTS `default_messages_users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `message_id` int(11) NOT NULL, `owner_user_id` int(11) NOT NULL, `to_user_id` ...
13
votes
2answers
38k views

What is the difference between optimize table and analyze table in mysql

What is the difference between optimize table and analyze table in mysql? I have read the online docs, but not sure what the difference is.
0
votes
0answers
321 views

How to autoincrement Prod_id based on Product_Name using trigger in mysql [duplicate]

Product_Details table : (Fields) Prod_id(Primary key), Product_Name, Prefix and Slno(Auto incremented) i need to increment Prod_Id based on the product name field and prefix field (Input will be ...
34
votes
1answer
47k views

intermittent MySQL crashes with error “Fatal error: cannot allocate memory for the buffer pool”

Added on edit, 2013-05-29: Because this is a long question and discussion, here's a short summary of the question and the solution. I had problems running MySQL and Apache on a small Linux server (1 ...
1
vote
1answer
64 views

Really strange behavior using variables in MySql query

I was answering a Question on Stack Overflow forum and the OP notice a really strange behavior that I could reproduce using the SQLFiddle site So lets go to it. We have this setup: CREATE TABLE ...
1
vote
0answers
30 views

MySQL can't connect as user with password locally

I am running into a strange authentification issue. Users can't connect to MySQL locally using a password, but they can without one. mysql -h localhost -u someuser -psomepassword won't work ...
0
votes
1answer
158 views

MySQL percona 5.6 to MySQL 5.5 replication

Scenario 1 I am having a MySQL DB on 5.5 which is compliance, So need to upgrade it to MySQL 5.6. while doing this we see that 5.6 is running slow, were as it runs perfectly on 5.5 backup. Scenario ...
0
votes
0answers
115 views

What happens if there is missing data in the slave MySQL server

At the data center there was electricity outage. And it appears that at that time my replication stopped syncing because it said something like this; "I cannot find the next position. Last proper ...
0
votes
1answer
35 views

Query to get the users who have a application approved

I have two tables Users and Submissions . Need to find the query to get the users who have submitted atleast one grant and have never won . I can write a subquery and achieve it .But I would like to ...
0
votes
1answer
284 views

Exception when trying to connect to remove MySQL from Intellij IDEA

I can't connect from Jetbrains IDA to my MySQL at AWS. I am getting exception: Connection to MySQL - aws failed java.sql.SQLException: Communications link failure The last packet sent successfully ...
4
votes
1answer
328 views

Subtract time difference between two columns in a table

Problem: How can I subtract the TIMEDIFF between two sensors (sensor 1 and sensor 2 in the example below) and return the the value in mili seconds? How do I get with the resolution of milliseconds? ...
0
votes
0answers
84 views

MySQL – Backup/Restore Selected Tables/Fields Only

I support a Python application (includes some C modules) that utilises a MySQL database. A number of clients are running this in a standalone environment but have agreed that we can use their data ...
1
vote
1answer
294 views

import text file getting command is not allowed with this MySQL version

here is my table CREATE TABLE cities ( country CHAR(2), city_ascii VARCHAR(100), city VARCHAR(255), region CHAR(2), population INT UNSIGNED, ...
0
votes
0answers
51 views

How to pivot a CSV file into a table

Input: a CSV file which cannot be changed prior to import Desired Output: A table where CSV_File.Name is a column and CSV_File.TagValue is the data in that column with a Key field Timestamp column ...
2
votes
0answers
66 views

Identifying table causing runaway rollback in MySQL 5.5 (InnoDB / Windows)

I have a large database (180 GB), running under Windows, with a runaway rollback that starts running as soon as the database is started up. I have started the database with innodb_force_recovery=3 ...
0
votes
0answers
15 views

How can i find next binary log to restore in mysql database

i am using mysql database,one database is writing data in binary log and those logs are sent to another machine through scp.In remote machine i want to restore binary logs. through mysqlbinlog bin-...
1
vote
0answers
77 views

changing mysql configuration . Getting errors like Table is marked as crashed and should be repaired

On Our server I have done following configuration for Database: [server has 2 core, 2 GB ram and windows 2008 operating system] query_cache_size= 32M [Old] query_cache_size= 50M ...
1
vote
1answer
417 views

Myloader command: Table doesn't exist

I took the backup of mysql database using mydumper command: mydumper -B mydb -o /backup/oct3 -s 500000 -c -m -S /tmp/mysql.sock -u root -p password@123 -v 3 Now, I am restoring mysql database ...
0
votes
1answer
342 views

mysql database under symlinked directory: ERROR 1018 (HY000): Can't read dir of './<dbname>/' (errno: 13)

I'm using mysql 5.5 on an ubuntu linux server. I need to move a database from its current location (under /var/lib/mysql) to a disk with more space, so I attempted to move the directory and create a ...
19
votes
2answers
30k views

InnoDB: Error: Table “mysql”.“innodb_table_stats” not found after upgrade to mysql 5.6

I upgraded to mysql 5.6 from 5.5, and now my logs are littered with such messages on startup I found a possible solution here, but it does not seem official. http://forums.mysql.com/read.php?22,...
3
votes
2answers
113 views

Is it possible to block a specific query, or return a static result?

Before you yell at me for doing it wrong, I know I'm doing it wrong. I'm using WHMCS (source code is not available), and we have a quarter of a million invoices. One particular query, which runs on ...
1
vote
1answer
1k views

Many mysql queries stuck at sending data

I am using opencart and I can se many queries blocking the mysql server. All queries are the same except the p.manufacturer_id. Attached there is the query and the explain of the query. The query is ...
-1
votes
1answer
22 views

mysql performance

Currently,we are using mysql 5.5.4 database on server with 4GB RAM,500GB HDD on Linux.There are predominantly 3 databases and the maximum size of database is 100MB.Assuming data grows at rate of x mb ...
0
votes
1answer
52 views

Multiple select for single row insert

I need to insert a row into a table by selecting value from multiple tables. I want a row to be inserted from multiple tables. insert into tab(id,name,date) values ((select max(id)+1 from tab),(...
0
votes
0answers
180 views

Significance of common schema - MySQL

Why common schema is not available in MySQL 5.6? What is the significance of it? So If there is a need for common schema for an application, what is the workaround to have common schema in 5.6 or ...
5
votes
1answer
425 views

SELECT RELEASE_LOCK causing “Mysql has gone away”

During a long running process (90m+), our code calls SELECT RELEASE_LOCK('..');. However it always gives a "Mysql has gone away" error when we do this. We never got to see the return value of the ...
1
vote
3answers
4k views

Amazon RDS MySQL performance issues

I have published my website on Amazon EC2 (Singapore region) and I have used MySQL RDS instance for the data storage. Everything is working very fine except performance. It seems that all queries, ...
0
votes
2answers
185 views

Mysql datetime field partial match

Currently I am designing a mysql table structure that will hold a couple of million rows. I want to search in it on datetime field by date year and so on but the date will be entered by user so it ...
0
votes
1answer
888 views

MariaDB/InnoDB: Temp file write failure

When attempting to alter a table to enable compression by modifying the KEY_BLOCK_SIZE I received the error: ERROR 1296 (HY000): Got error 64 'Temp file write failure' from InnoDB The command ...
0
votes
1answer
110 views

mysqlbinlog: unknown variable ssl_key or ssl_cert or ssl_ca

I am trying to recover binlog from a remote server using mysqlbinlog client program, however it appears that mysqlbinlog doesn't recognize the SSL options that's required to establish SSL connect to ...
1
vote
3answers
750 views

Amazon AWS RDS Aurora Row size too large (VB5)

We're trying to import our vbulletin 5 database into RDS/Aurora and getting this: ERROR 1118 (42000) at line 5733: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ...
1
vote
0answers
1k views

MySQL - Truncated incorrect datetime value on update statement

I have an application which produces log files. These log files include a Timestamp field in the format 2015-08-25T09:35:01 UTC. (there will be apx 60 logs produced at 0.25 GB per day). I need to ...
1
vote
1answer
156 views

MySQL - include a default value in LOAD XML INFILE statement

I have the follwing table: CREATE TABLE `tab1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `DEFAULT` VARCHAR(25) DEFAULT NULL, `ITEM` varchar(25) DEFAULT NULL, `TIMESTAMP` TIMESTAMP ...
12
votes
3answers
23k views

mysql wont start after increasing innodb_buffer_pool_size and innodb_log_file_size

I am following this solution here http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#comment14041132_4056261 and tried to increase my innodb_buffer_pool_size ...
2
votes
3answers
2k views

Converting live MyISAM table to InnoDB

I have a table that tracks web traffic. The table is constantly written and read from. Since table is pretty big in size I have to make sure the application will not "freeze" in the process of ...
0
votes
1answer
54 views

Changing Default Values of Percona Audit Log

Have I missed Something here? I am installing the Percona Audit Log Plugin (MySQL 5.5). I can install it fine using: INSTALL PLUGIN audit_log SONAME 'audit_log.so'; I can then see all the default ...
1
vote
0answers
36 views

MySQL/Percona Audit Log Plugin Not Working

I've been looking to implemement the Percona Audit Log plugin. So far I have installed it and configured it, and it seems to be working ok. Except, I have installed it on a slave Database as I don't ...
0
votes
1answer
196 views

Fulltext Search Doesn't Match a Hashtag

We maintain a table that looks like this to perform search queries on our forums database. I'll draw your attention to the FULLTEXT columns: CREATE TABLE `forums_posts_search` ( `post_id` bigint(20)...
1
vote
1answer
176 views

Diffrences between master and slave replication in mysql?

In a database named asterisk, there is a table named cdr which was partitioned on the time field. mysql> show create table cdr; Create Table: CREATE TABLE `cdr` ( `gid` bigint(20) NOT NULL ...
1
vote
0answers
102 views

Update queries randomly slow on INNODB Mysql

I have been struggling with a slow update query. Have already tried using indexes and other query optimization techniques. I have been using MYSQL database with INNODB engine. The issue is that, ...