1
vote
2answers
76 views

Why is MySQL not using the index with the higher cardinality?

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' ...
1
vote
1answer
36 views

ALTER TABLE - Rename a column

This got me nuts! I want to rename a column from read-more to read_more in blog table Tried all this: ALTER TABLE blog RENAME COLUMN read-more to read_more; ALTER TABLE blog CHANGE COLUMN ...
2
votes
3answers
43 views

How to update cust_id from Customer table to order table Cust_id field while inserting customer name using trigger

I have two tables 1. Customer_details and 2. Order_details. 1.Customer_details table -->fields--> Cust_Id(Primary Key) and Customer_Name, 2.Order_details table --> fields-- Ord_Id(Primary ...
0
votes
1answer
46 views

MySQL rebuild after Corrupt ibdata1

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 ...
0
votes
0answers
20 views

On replicating all tables of a given database except for those starting with some pattern

I'd like a slave to replicate all tables of a given database except for those starting with some pattern, eg. those with names starting with 'nc' (non-critical, redundant denormalized tables). So I ...
0
votes
1answer
60 views

Mysql query in Database

How to get all the tables from database with all values in tables using single query.. I tried using $sql = "SHOW TABLES FROM $dbname"; $result = mysql_query($sql); $arrayCount = 0 while ($row = ...
0
votes
2answers
113 views

Getting table definitions on the command line in MySQL [closed]

I am new to MySQL. I am trying to get table definitions from the database server (4.0.26). I tried below steps to get information, running cmd as an administrator: c:\> cd mysql\bin\ ...
0
votes
0answers
257 views

MySQL 5.6 Installation error on Windows 7

At the last step, when MySQL installer tries to configure, it fails with the following error message: mysql-server-5.6-winx64:50 - Started service. mysql-server-5.6-winx64:56 - Attempting to update ...
1
vote
1answer
204 views

mysql 5.1 — unknown variable 'basedir=c:/mysql/'

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 ...
0
votes
2answers
980 views

How to force higher values of open_files_limit or table_open_cache?

I'm having a frustrating problem where setting my.cnf to values higher than I currently have them does not 'take'. This is MySQL 5.6.14 on MacOS X 10.8.3 I'm trying to address dropped connections ...
1
vote
1answer
657 views

Selecting multiple columns from multiple rows in one column (subquery?)

I'm working with MySQL 5.1.68. I have a situation where I'd like to select rows from another table into a column. I'd like to output this: id # name # citizen_name (multiple citizen names) 1 # ...
0
votes
1answer
130 views

Two different MYSQl instances on same machine?

I have MySQL 5.6 installed (Linux). /var/lib/mysql /etc/my.cnf I have a cold backup that I am recovering: /var/lib/mysql_backup /etc/mybackup.cnf In April I was able to get the backup started ...
0
votes
1answer
1k views

How to select only first column dynamically on mysql

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.. ...
0
votes
0answers
346 views

Update row to another table using mysql trigger

I have the following 2 tables (places & offer_company) in a MySQL database named COUPON1.81. CREATE TABLE IF NOT EXISTS `places` ( `id` int(60) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT ...
-1
votes
1answer
260 views

Calculating employee's work time

I need to store and analyze employee's work time. Currently, I've developed this table structure CREATE TABLE `hirefire` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `employeeid` int(10) ...
0
votes
2answers
65 views

Mysql Command required for getting values from my.cnf

I am new to MySQL DBA, i have a doubt, Is there any command for finding my.cnf configuration file variables and its respective value which is mention in my.cnf file in mysql prompt itself. like we ...
0
votes
0answers
379 views

mysql deadlock while updating: ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction update

I am using the mysql version 5.5.29 in my production server. while executing set of update statement inside the procedure it is throughing the following error: ERROR 1213 (40001): Deadlock found when ...
1
vote
2answers
92 views

Where condition execution sequence in MySQL

I am using MySQL 5.0.88. I have a query like: select DISTINCT party.­id FROM party­ LEFT join party_­identifier AS pi ON pi.­party_­id = party.­id­ WHERE ­(pi.­source_­note=? AND ...
2
votes
1answer
1k views

Allocating 8GB memory to MySQL on a 64bit system

Specs - MySQL 5.0.x , Redhat 5.9 , Physical memory - 16GB I am trying to set innodb buffer pool size to 8GB (innodb_buffer_pool_size=8G). When i do, and start mysql, i get following error - ...
3
votes
2answers
134 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 ...
0
votes
1answer
142 views

Mysql query is very slow

I am developing a website like any other social networking site using mysql. I wish it give people suggestion to my users, and I have implemented this functionality in my application, but It is ...
0
votes
0answers
237 views

UPDATE / SELECT incredibly slow in MySQL InnoDB

I have 1 table with 2.5 billion records(2.5 Cr.) and I am trying to get count of records based on indexed column. it takes 115 seconds to execute same. Query : Select count(1) from table1 where ...
-4
votes
1answer
219 views

where can I get mysql-5.1.7.tar.gz or mysql-5.1.9.tar.gz? [closed]

I need mysql-5.1.7.tar.gz or mysql-5.1.9.tar.gz, but I can not find them anywhere, who can give me a link to find them, thank you very much!!!
1
vote
1answer
316 views

Is it okay to have different lower_case_table_names value on master and slave?

I have a OSX MySQL master with lower_case_table_names set to 2. I have just setup a Linux MySQL slave with lower_case_table_names=1. I haven't started replication on the slave, but everything looks ...
1
vote
2answers
138 views

Should master and slave have same mysql version?

I have a master database running mysql 5.5.11, and I am planning to setup a new slave. I am planning to use the 5.5.30 as it is the latest version. For setting up new slave, I am copying files from ...
0
votes
2answers
192 views

Autosync master and slave when master goes offline

I have a master slave setup using MySQL 5.0. I have very frequent writes to the master and slave is used only for backup purpose (no explicit writes). In my current configuration, the slave database ...
0
votes
1answer
398 views

Why would mysql “show global status” query be taking 15 minutes?

I'm reviewing the slow log, and on one of my slaves the average time for SHOW GLOBAL STATUS is 914s. Any idea how to determine the cause of this?
0
votes
1answer
716 views

mysql duplicate entry error 1062 when restoring backup

Sorry, I seen similar threads but I still couldn't find it addressing my issue plus, I needed some more info on this. Requirement: To create an exact replica 'db4' of an existing DB 'db3'. Procedure ...
1
vote
1answer
1k views

How soon after updating expire_logs_days param and restarting sql will old binlogs get deleted?

MySQL 5.1.x | InnoDB | Windows My mysql data directory is starting to fill up with bin logs. I currently have the following settings configured in my windows mysql server: [mysqld] log-bin ...
1
vote
1answer
739 views

Where is the MySQL variable - innodb_flush_method?

I would like to tweak the value of innodb_flush_method to find out its performance impact on a database server. That variable is listed when I run the command SHOW VARIABLES. But I could not find it ...
0
votes
2answers
70 views

MySQL query slow even with indexes

Structure of my table mysql> show create table t_group_tag_relation\G *************************** 1. row *************************** Table: t_group_tag_relation Create Table: CREATE TABLE ...
1
vote
2answers
1k views

MySQL not responding, Writing to net status

I just had to reboot MySQL to regain access to some of my website. It had under 300MB of RAM used. Another product was working fine though, accessing it's own tables which are InnoDB. Here's the show ...
1
vote
1answer
529 views

How to write signal function in MySQL that can be called from Triggers and Stored Functions?

In my Database I have a table: Employee with recursive association, an employee can be boss of other employee. The Table Description: mysql> DESC Employee; ...
1
vote
1answer
747 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: ...
0
votes
1answer
217 views

How to removing or reduce the size of redo logs in MySQL cluster

Can anybody tell me that how can we reduce the redo log file size or can we remove the redo log file size in MySQL Cluster and also what will be the impact of it on performance of cluster.Also can we ...
1
vote
1answer
905 views

Retrieve double data type value in non exponential form

Is it possible to retrieve non-exponential value in double data type column? After the width of the column is increased to 15 it shows the values in exponential form. Now I get the following: ...
3
votes
3answers
1k views

MySQL optimization - year column grouping - using temporary table, filesort

I have a transactions table which is having 600,000 records, I need to list the count for the dashboard on financial year basis. The table used is MyISAM. I tried adding index for the transaction date ...
0
votes
1answer
737 views

How can I enable my-huge file on windows server?

I installed Windows Server 2008 and MySQL 5.5. Now I need configure MySQL for huge InnoDB tables and a lot of connections. I see that on my Windows Server, there is a my-huge file(configs files that ...
1
vote
1answer
254 views

Mysql 5.0 on Windows 2008

I have a problem with MySQL on Windows Server 2008 x64. This is the first time I've installed MySQL 5.5 with performance problems. I decided to go back to the older version that worked well with ...
1
vote
1answer
505 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
1answer
4k views

Change existing datadir path in mysql

I want to change the datadir path in the my.ini file. The existing datadir path is C:/ProgramData/MySQL/MySQL Server 5.1/Data/ The size of my C: drive is 30GB and the MySQL data folder is occupying ...
1
vote
1answer
527 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 ...
4
votes
1answer
2k views

Setting up MySQL Cluster on Two Systems

I am attempting to setup a MySQL Cluster. I have the folllowing setup one management node two data nodes another machine on which two more nodes reside Below is the config.ini file: [ndbd ...
2
votes
2answers
298 views

MySQL - How much physical space will be reduced by changing the column type?

Lets say I have the following table: CREATE TABLE `my_table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `relationship_status` varchar(48) CHARACTER SET utf8 COLLATE ...
1
vote
1answer
2k views

How to log logon logoff and user activity on mySQL server for audit?

My boss wants to have some kind of log on the server running mysql which would log user activity. Kind of like: User blah logged in User blah ran some query User blah logedd off User asdf ...
2
votes
2answers
112 views

How to see what was executed in the database via binlogs for specific date?

I am trying figure out how to "query" binlogs to see what was exectued in the database for a specific date. For example, if I execute mysqlbinlog binlog then the thing just runs forever and it is had ...
2
votes
1answer
439 views

query generate the information one column in two columns in one query

I have a question related with a query in sql. I have the next table: id name 1 name1 2 country1 3 name2 4 country2 I need to call the results so: ...
4
votes
1answer
4k views

Deleting bin logs in replication environment

I have a question about deleting binary logs in the replication environment: We have an environment with 1 master and 2 slaves (running mysql 5.5). Sometimes, we run into a space issues during heavy ...
3
votes
1answer
2k views

PostgreSQL 9.1 vs MySQL 5.6 with InnoDB ? Which is better for scaling?

PostgreSQL 9.1 vs MySQL 5.6 with InnoDB. I do know that PostgreSQL offers better SQL features. I am currently using MySQL 5.6 lab release (the one with InnoDb full text search feature)(not in ...
5
votes
3answers
3k views

Maximum table size for MySQL database server running on Windows (NTFS) Table type InnoDB

I need to design database to store information contained in millions of log files generated by devices on trial on network. I have designed 5 different tables to store log file information. But, as ...