Tagged Questions

MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

5
votes
2answers
973 views

MySQL: What is the maximum number of cores used by a single MySQL server?

What is the maximum number of cores used by a single MySQL server in a production setting?
3
votes
1answer
436 views

Any reasons at all *not* to use MySQL in this scenario

I want to know if there is any reasons at all not to use MySQL in this scenario. 2 servers behind a virtual IP with MySQL master-master replication Goal: redundancy, want this to run 24/7 ...
3
votes
2answers
365 views

TOP X of SQL Server in MySQL Analog

I am looking for SQL Server TOP (X) Analog in MySQL In SQL Server: SELECT TOP 5 Z ... FROM ORDER BY Z DESC How can this be done in MySQL? ADDED: I have found for other RDBMS: Returning TOP N ...
5
votes
4answers
2k views

Why are so many MPP solutions based on PostgreSQL instead of MySQL?

Astor Data, Greenplum and GridSQL all allow Massive Parallel Processing of SQL queries. They are also all built around PostgreSQL technology. Is this just because of licensing issues or are there ...
4
votes
2answers
669 views

Fetch first 9 records and make one more record which will be as “Others” in MySQL

I am fetching records from one table with count of one field with other field as name. I want only 10 records. out of which 9 records give me field and its count. but i want to show 10 record as ...
2
votes
2answers
1k views

Having Problems Installing 64-bit MySQL 5.5.8 x86 on OS X 10.6.6

I'm really new to databases and SQL in general, previously having installed MySQL only to hand it over completely to some CMS or other. Now, I want to get serious about adding SQL and MySQL or ...
1
vote
1answer
718 views

Multilingual Dictionary Database question

Let's say someone is coding a multilingual dictionary in PHP, and he wants to let people submit both words and definitions in English and Spanish, but wants to track it so they can be filtered. ...
4
votes
1answer
2k views

MySQL master binlog corruption

We recently made some changes to our infrastructure and now I can't keep MySQL replication running. The slave complains of a corrupt binlog and resetting it doesn't help. I keep seeing entries like ...
16
votes
6answers
5k views

What problems will I get creating a database per customer?

I remember from the stackoverflow podcasts that Fog Creek use a database per customer for Fogbugz. I assume that means the Fogbugz On Demand servers have 10s of thousands of databases. We are just ...
2
votes
1answer
426 views

MySQL MyISAM Table Locking and Delayed Inserts for Webserver Access Logs

We will install a webserver that writes access logs to a MySQL table. Access logs of course will get really really big, so this will be a separate MySQL instance from the regular data and we will more ...
7
votes
5answers
13k views

MySQL : DROP TABLE Starting with a Prefix

EXAMPLE : I have more than 30 tables starting with a prefix "dp_" and about 12 starting with "ex_". QUESTION : How can I drop all tables starting "dp_" in one query ?
1
vote
1answer
500 views

Concurrent INSERTs in XtraDB (InnoDB)

I'm currently unable to insert rows concurrently in an XtraDB table on Percona Server 5.1.54. I had the same problem with a similar version of MySQL. My table definition is as follows. CREATE TABLE ...
7
votes
2answers
2k views

What's a good way to add a PRIMARY KEY to a large InnoDB table?

I have a table with around 30 million rows in MySQL 5.5 using the InnoDB storage engine. This table has a foreign key that links to another table with around 3 million rows. I want to add a primary ...
10
votes
3answers
1k views

What to do when a field in a table approaches the max signed or unsigned 32 bit integer?

In any given database that hold user records in the form of an unique auto-increment field (for the sake of the example, inter-user messages)... what to do when the time comes and it approaches the ...
5
votes
3answers
9k 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 ...
3
votes
3answers
496 views

Storing a large number of small size entries in MySQL

I have a database that stores readings from numerous gauges. Depending on the gauge, there may be data for that gauge every 1-5 minutes with multiple readings (i.e.- weather station and it stores 5 ...
7
votes
1answer
2k views

Unexplained InnoDB timeouts

I've been seeing some very basic updates timing out lately and have not been able to determine the cause. An example: //# Query_time: 51 Lock_time: 0 Rows_sent: 0 Rows_examined: 0 UPDATE photos ...
9
votes
2answers
10k views

InnoDB create table error: “Row size too large”

We have some engineers that flatten a normalized db structure into a temporary table for the purposes of generating a report. The columns are specified as TEXT NOT NULL (I know "why are they doing ...
3
votes
3answers
1k views

Estimate large database size and speed

First I want to know how to estimate the database size regarding the biggest table it will contains. I've the following : +----------+------------------+------+-----+---------+-------+ | Field | ...
12
votes
5answers
13k views

Why do MySQL threads often show “freeing items” status when the query cache is disabled?

When I run SHOW PROCESSLIST, there are often a large number of INSERT/UPDATE threads in the "freeing items" state. The MySQL manual suggests that at least part of the reason for a thread to be in ...
8
votes
3answers
4k views

MySQL data type for 128 bit integers

I need to store 128 bits unsigned integers into MySQL and I was wondering what is the best data type to store such big numbers. Right now, I'm using binary(16) but that involves a lot of conversion ...
2
votes
1answer
2k views

What is the corresponding MySQL TimeStamp in MS SQL Server?

I need a timestamp to be created automatically when I insert information in a table. mySQL has TimeStamp but MS SQL Server TimeStamp doesn’t correspond mySQL. Is there any other way around?
2
votes
2answers
354 views

Will this Database design logic work and what should be used?

A few weeks ago I had a client of mine ask me about how complex it would be to develop a custom CRM application similar to the one being provided by highrisehq.com What he essentially wants to do is ...
4
votes
3answers
2k views

Changed max_allowed_packet and still receiving 'Packet Too Large' error

I use mysqldump to create a flat file for backup purposes. I have used this file to recreate the database on an alternate server. I ran the import process through ssh on the command line and I ...
4
votes
2answers
1k views

MySQL Table Crashed Needs Repair, but Doesn't seem to Repair?

I am getting the error: Table 'feed_data' is marked as crashed and should be repaired So I run REPAIR TABLE feed_data (repeatedly) and get the following result: ...
5
votes
4answers
4k views

MySQL: Index when joining to tables not being used (Performance optimizing question)

I need to optimize the following query: SELECT /* [things omitted] */ articles.blogpost_id, articles.id AS articleid FROM blogposts JOIN articles ON articles.blogpost_id = blogposts.id WHERE ...
1
vote
2answers
1k views

Connect a linked server to MS Reporting Service?

I've got a MYSQL server setup as a linked server in MS SQL server 2008. Can someone tell me if it is possible to generate reports from this server? How do I connect it to Reporting Services?
3
votes
2answers
3k views

Error Querying MySQL server linked to SQL Server 2008

I've created a linked server in MS SQL Server 2008 to a remote MySQL server. When I try to query any tables, I get an error: .tablename. contains no columns that can be selected or the current user ...
8
votes
9answers
7k views

What tools are there for data masking? (MySQL, Linux) [on hold]

I'm looking for (ideally free, open-source) data masking tools. Do any such exist? Note: this related question deals with tools for generating test data, but in this question I'm more interested in ...
4
votes
5answers
1k views

What is the best use of memory in MySQL?

I have a MySql server with 2Gb of memory. What's the best configuration to use then with best results? How can I "distribute" this memory fine to MySql server?
6
votes
4answers
3k views

MySQL Replication - Introduce new Slave to replication

I've recently taken on a sys admin position managing a group of 20 (or so) servers. One thing I haven't dealt with before (apart from in a test situation), is introducing a new slave to the MySQL ...
2
votes
8answers
3k views

What database front end do you use? [closed]

What database front end do you use? It should let you manage databases, tables, indexes and ideally even data records. And it should ideally be free so we can all use it too. Databases that it could ...
5
votes
3answers
4k views

Why does this Entity Framework query perform so bad in MySQL?

Let me give you a little setup. We have a InnoDB table on MySQL 5.1 with close to 20 million records, no foreign keys, and proper indexes for queries we do. We are using the latest 6.3.5 MySQL ...
3
votes
3answers
3k views

Confirm that my.cnf file has loaded OK

Does anyone know if there is a way to confirm if any my.cnf file is being read by MySQL? I only have the one my.cnf on the machine (and there are no my.ini files) which I have in /etc/my.cnf. When I ...
7
votes
4answers
11k views

Replicating a remote MySQL database to MS SQL Server 2008

I want to replicate the contents of a MySQL database to a MS SQL Server 2008 database. Is this possible? Can anyone outline the steps required in order to achieve this? Thanks.
5
votes
2answers
689 views

How do I search to see if a MySQL user exists on the system?

I'm not finding a user by show grants for 'username'@'localhost'' I'm thinking that perhaps the username is slightly different, so I want to do a wildcard search of all the database users. How can I ...
8
votes
3answers
6k views

Audit logins on MySQL database

Is there a way to audit logins to MySQL? I'd like to be able to create a username for each employee and thereby create an audit trail of logins. However, googling has turned up no good results. The ...
3
votes
3answers
489 views

What kind of hardware/software config should I look at for a MySQL database with 10,000 plus tables

I am looking at rolling out a CMS system that will require the creation of around 10,000 tables within the primary MySQL database of the system. The database will be the data store for several ...
0
votes
1answer
617 views

One record, multiple updates in one query (MySQL)

I run into a problem for which I didn't find an answer anywhere: If I have a table in which one specific value(here amount) from multiple records can add into a target record(from the same table), can ...
5
votes
2answers
3k views

How can you stop MySQL slave from replicating changes to the 'mysql' database?

I have my slave set to not replicate the 'mysql' database as described in this SHOW SLAVE STATUS\G; Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 ...
17
votes
4answers
624 views

Is "CREATE INDEX` in MySQL a Linear Operation?

What I mean is the following: If creating an index on a table with n rows takes t time. Will creating an index on the same table with 1000*ntake approximately 1000*t time. What I'm trying to achieve ...
5
votes
4answers
9k views

How do I find out if a procedure or function exists in a mysql database?

How do I find out if a procedure or function exists in a mysql database? and is there any discovery option? like a show procedures; (e.g. like show tables;)
12
votes
2answers
2k views

Can I create index on a table in a MySQL database while in use

And if I can, any reason (performance/stability) why I shouldn't?
2
votes
2answers
431 views

Transferring concepts - users/groups/permissions of db objects from mysql to postgresql

This seemed like a better fit here than stackoverflow, so here goes: I've been using mysql for a while since on most of the cheap webhosts it is the provided database. However, now I've started ...
9
votes
5answers
2k views

Is it unwise to run replication on same physical server?

I'm contemplating setting up a Master-Slave replication for my database. The slave server will be used for redundancy and possibly a reports server. However, one of the biggest issues I'm running into ...
5
votes
1answer
324 views

MySQL and Solid State Disks on EMC

Since all writes and sequential reads are cached by the EMC storage system, the best use for solid state disk is to store data that has a random READ pattern. On Oracle, that is the temp tablespace ...
7
votes
3answers
1k views

Can you “su -” in MySQL?

If I have root on a mysql database and I want to drop privileges to that of a normal user, without using their password, can I do it? if so how? think # su - username on unix. Basically, I'm just ...
3
votes
1answer
597 views

MySQL CREATE statement are really slow (Mac OS X / Macport install) [closed]

I recently noticed that recreating the database for the web application I am working on is taking a lot of time. I had just reinstalled Mysql from Macport... I am getting really lousy performances, ...
3
votes
1answer
874 views

Foreign Key violation - not sure why

I have the following two tables with a foreign key on status_id: mysql> describe usr_cookbook; +-----------+-----------+------+-----+-------------------+-------+ | Field | Type | Null | ...
24
votes
8answers
9k views

Tool to generate large datasets of test data [closed]

Many times when trying to come up with an efficient database design the best course of action is to build two sample databases, fill them with data, and run some queries against them to see which one ...