MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
945 views

Varchar index - will hashing value make it faster?

I have a VARCHAR(1000) column in a table. It will contain strings that will not be guaranteed to be unique. I have a query that searches this column as part of a WHERE IN clause, the list of values in ...
1
vote
1answer
212 views

Issues converting MyISAM table to InnoDB (auto column issue)

I'm having issues trying to convert a table from MyISAM to InnoDB in MySQL 5.6. The following is the table dump: -- -- Table structure for table `companies` -- DROP TABLE IF EXISTS `companies`; ...
1
vote
1answer
138 views

Is there a way to recover this database (MySQL)

I did a "cold" (db offline, all filesystem files) backup of a MySQL db. I wrote the backup to an ISO image. Unfortunately Joliet filenames are not default. I didn't realize that until attempting to ...
1
vote
2answers
1k views

Recursive query in mysql

I am using GetAncestry function found at this post, The problem is when I try to use it with select query Mysql hang, I am not sure why it is happens my Mysql version is "5.5.16" any help appriciable ...
1
vote
1answer
51 views

After adding a slave to Master - Master configuration, slave syncs from only one master

Futher to my previous question, Here is what we have +<------+ | ^ V | S1<---M1 M2 | ^ V | +-------+ what happens is Upon ...
1
vote
2answers
141 views

Breaking Semisynchronous Replication in MySQL 5.5

I've set up Semisynchronous Replication between two MySQL 5.5 servers running on Windows 7. My application is running and updating the database of the master server and same is being updated in the ...
1
vote
1answer
765 views

Why does MATCH() give Score 0, if there are less rows in the database?

I followed this example from the Mysql Documentation: CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), body TEXT, FULLTEXT ...
1
vote
2answers
5k views

MySQL Installation error: Unable to update security settings

I tried to configure MySQL server 5.5 on Windows and this is what I get mysql-server-5.5-winx64:56 - Attempting to update security settings. mysql-server-5.5-winx64:100 - Unable to update security ...
1
vote
2answers
375 views

MySQL: optimal configs / methods for ALTER of large MyISAM table to InnoDB (17gb+)

I have a large MySQL (5.1) MyISAM table (13gb table, 4GB indexes - 40mm+ records) I'm going to be converting this table to InnoDB in a production environment. The DB is on a cloud server with ...
1
vote
1answer
559 views

MySQL Point in Time Recovery For Just a Single Schema?

Is it possible to simply restore a single schema and bring it to a point in time (Say three hours ago) without bringing the entire database back? I can think of a lengthy method of backing up each ...
1
vote
1answer
471 views

Master to Slave to Slave Configuration in MySQL

We currently have 3 MySQL Servers running; the first which contains production data and is due to be retired mysqld Ver 5.5.28-0ubuntu0.12.04.2 for debian-linux-gnu on x86_64 ((Ubuntu)) mysql> ...
1
vote
2answers
2k views

Getting repeated value in a group_concat only if ids are different

I have two tables, first the table Product: id|category_id --+----------- 1 | 12345 2 | 12345 3 | 12465 And then a table activity: id|prod_id|activity_type |description ...
1
vote
2answers
88 views

Change the Existing Topology of a MySQL Replication Setup

I want to be able to edit the topology of an existing replication, is that possible? For example if I have a star topology, I want to edit it to make it a ring one. How can I do that? I'm thinking ...
1
vote
1answer
321 views

Can I use symlink or data directory for ARCHIVE MySQL tables?

All mention of either using a symlink or data/index separate data directories state that MyISAM is the only supported (https://dev.mysql.com/doc/refman/5.5/en/symbolic-links.html). However, I found ...
1
vote
1answer
425 views

Experience using ScaleArc in test or production?

Has anyone had any experience using ScaleArc? My CTO has asked my thoughts on it, and I have seen no information out there regarding real-world experiences.
1
vote
1answer
662 views

How to check growth of database in mysql?

I want to know is there any method to check the growth of database on file EXAMPLES Database A contains all tables in INNODB storage engine Database B contains all tables in MyISAM storage engine ...
1
vote
1answer
123 views

Performance impact of including result column in indexed columns

I have a database (in MySQL, using InnoDB) that I am using for texture identification in a 3D image. In it, there will be a table of texels(texture pixels) with hue included, in the form of: texelid ...
1
vote
3answers
3k views

Automatic MySQL Replication Fail-over Strategy

I want to know that if replication is down due to some reason as if master is down then what strategy should be followed so that the replication is up instantly without manually intervening the ...
1
vote
1answer
448 views

MySql proxy to replication configuration

Is there any solution (say a proxy) that makes MySQL replication cluster behave like one database towards developers? And developers then don't need to worry about using master to write and slaves to ...
1
vote
3answers
154 views

Where can I learn about MySQL master/slave, master/master, or clustering setups?

What are the best resources you've read or watched about setting up master/slave or clustering for database replication? I don't know much about this. I have a database that is getting rather large ...
1
vote
1answer
696 views

How to properly secure MySQL database?

We have a web application based on the famous triad apache + php + mysql which we sell to our customers and gets installed on their servers. Currently, we are using MySQL 5.1.41 which has only a ...
1
vote
2answers
1k views

Cache all mysql table

Maybe it sound's like i'm an idiot... But i'm developing app with huge db on RoR. Also i see that if i do some query and after that do it one more it is doing much faster, becouse it has been ...
1
vote
1answer
925 views

How to know the current log sequence number in 5.0.X

I would like to test the optimal value for iblog files on my mysql which is 5.0.77 I found the below procedure in mysqlperformance blog: ...
1
vote
2answers
485 views

How do I remove duplicate entries in a given timeframe?

My table looks like this: +-----------+ | id | <- primary key | time | <- DateTime | row2 | <- varchar | row3 | | ... | +-----------+ I want to remove all ...
1
vote
1answer
292 views

Setting up DRBD on an active MySQL server

When it comes to setting up DRBD and MySQL, is the following possible? Set up DRBD on an active MySQL server Set up DRBD with no downtime allowed
1
vote
3answers
361 views

query optimization for update nested query IN(SELECT

Can we optimize this? UPDATE TABLE_NOTE SET COL_NOTE_DISPLAY='BLOCK' WHERE COL_NOTE_BIBID = $projectID AND $COL_NOTE_ID IN ( SELECT COL_PILENOTEREL_NOTE_ID FROM TABLE_PILENOTEREL ...
1
vote
1answer
4k views

Some MySQL slave errors?

Master version: mysql-server-5.5.14-1.el5.remi Slave version: Percona-XtraDB-Cluster-server-5.5.24-23.6.340 Binlog format: ROW based I'm using PRM to setup HA for MySQL. Sometime, MySQL slave ...
1
vote
3answers
249 views

MySQL Query - How to get most recent demographics?

I have a table that has duplicated cardnbr's. I need to pull out demographics that are the most recently used by the customer. I have a date field (lastvisit) that shows their most recently used card. ...
1
vote
1answer
120 views

Several values from different tables

I'm totally lost here and not know how to get this to work and hope any can help me here. I have several tables: default_users, default_profiles, default_status, default_comment and latest ...
1
vote
1answer
653 views

“Mysql has gone away” heavy multiple insert

I am stuck because Mysql server will go away after executing this part of code this function will update the database with the new RSS feeds which are stored in ToUpdate but Mysql stops working. Every ...
1
vote
0answers
161 views

Get all comment.message, status.message, users.* and profiles.* where users.user_id exists in friend.friend_id or friend.user_id

I need some help building this query because it's a bit complicated at least for me. I need to get all comment.message, status.message, users.* and profiles.* where users.user_id exists in ...
1
vote
1answer
152 views

How to interpret explain sql?

SELECT DISTINCT TB.ID, TB.Latitude, TB.Longitude, 111151.293413 * SQRT( pow( - 6.185 - TB.Latitude, 2 ) + pow( 106.773 - TB.Longitude, 2 ) * 0.988392289802 ) AS Distance FROM `tablebusiness` AS TB ...
1
vote
1answer
212 views

What storage engine should I use for this MySQL table?

I have a table where I store all the urls from my website, and I update them from time to time when a visitor enters. The primary key is the url itself varchar(255). I have set it to use InnoDB but ...
1
vote
1answer
520 views

Delete by primary key takes too long

What would make a query that deletes a row using the primary key of the table .. take too long ? This is a table with about 1.4M rows that gets .. 70%/30% read/write . I don't know where to look. ...
1
vote
0answers
24 views

JBoss/Alfresco cannot write on slave after failover [duplicate]

Possible Duplicate: JBoss don't fail over MySQL slave using datasource I'm trying to set up an high available MySQL "cluster", using a Master / Slave Replication configuration. I want ...
1
vote
1answer
932 views

Error in login in with root user in new mysql server

I've installed a MySQL server in CentOS 6.2 machine +-------------------------+---------------------+ | Variable_name | Value | ...
1
vote
1answer
378 views

Replication Broken, List Out of Sync Tables

In a master-slave setup on MySQL 5.5 on RHEL 6.1, when db replication breaks (for whatever reason), what is a good way to: check (and alert) replication is broken? get a list of tables that are out ...
1
vote
2answers
4k views

Copy complete structure of a table in MySQL without using a backup?

In MySQL, how can someone copy a table structure without using a backup? jcho360> show create table actor\G *************************** 1. row *************************** Table: ...
1
vote
1answer
4k views

Problem with View When Restoring a MySQL Backup

I have a database (InnoDB) with some tables, views and routines... Periodically I do a backup using the command line: mysqldump -u user -ppassword --routines db_name > backup.sql But I have a ...
1
vote
2answers
1k views

Restore data from remote server using “.sql” file

I have a ".SQL" file which contains data at a remote server. I could download that file to my local machine and import data in my local DB, but because of network issues, and the size of ".sql" file ...
1
vote
2answers
1k views

Slave settings not working

I have this machine as slave. Below is the command I ran and stuck. I done the change on the config file and set the id=2 too. Anything else I am missing here? slave start; ERROR 1201 (HY000): Could ...
1
vote
1answer
813 views

MySQL import csv only gets half the lines

I use the following command to read in a csv: LOAD DATA INFILE '/Users/Tyler/Desktop/players_escaped.txt' INTO TABLE players FIELDS TERMINATED BY ',' ENCLOSED BY '^' LINES TERMINATED BY '\n'; The ...
1
vote
1answer
277 views

Why are these queries slow in some environments and not others? Can we fix their performance?

The following stored procedures in a MySQL 5.x environment: DELIMITER // CREATE PROCEDURE sp_belongs_to (IN schemaName VARCHAR(100), IN tableName VARCHAR(100)) BEGIN SELECT TABLE_NAME as ...
1
vote
1answer
3k views

How to set a specific directory location for individual MySQL database?

Is it possible to set each database in MySQL to use a separate datadir? I'm running a userdir development (sandbox) server and would like to put the MySQL data files for the database(s) for that user ...
1
vote
0answers
790 views

Why can I not start mysql server on ubuntu after change the innodb_flush_log_at_trx_commit value to be 2?

Why can I not start mysql server on ubuntu after change the innodb_flush_log_at_trx_commit value to be 2 ? updated to answer the 3 questions: mysql> show variables like 'version%'; ...
1
vote
1answer
1k views

mysql bin-log.index not found

I moved my bin-logs to a different folder: log-bin = /storage/mysql/bin-log log-bin-index = /storage/mysql/bin-log.index When I try to start mysqld I get this: /usr/libexec/mysqld: File ...
1
vote
1answer
859 views

I am getting an error while trying to download binary for mysql 5.5.11

I am trying to upgrade MySQL 5.1 to 5.5.11 on Ubuntu 10.10. Everytime I try the wget command I get this error: wget ...
1
vote
3answers
1k views

MySQL SSL disabled on Windows

I want to enable an SSL connection to my database. I've created SSL certificates and so on, however SSL remains disabled: mysql> show variables like '%ssl%'; ...
1
vote
2answers
571 views

Mysql master-master permission replication issue

I came to know it's safe to replicate mysql database to have the users and permissions replicated, from a post in ServerFault is-it-ok-to-replicate-mysql-db. I have setup master-master replication ...
1
vote
2answers
1k views

Join three tables

I have those three tables SELECT occuId as 'Occupation Id',occuDscr as 'Occupation Description' FROM occupation_field; +---------------+------------------------+ | Occupation Id | Occupation ...