Questions tagged [mysql]

MySQL is an open-source database owned by Oracle. ServerFault topics include how to run the server. For more MySQL specific questions like backup/restore/recovery/configuration, dba.stackexchange.com is probably a better home.

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. MySQL is officially pronounced /maɪˌɛskjuːˈɛl/ ("My S-Q-L"), but is often pronounced /maɪˈsiːkwəl/ ("My Sequel"). It is named for My, the daughter of Michael Widenius (the original developer of MySQL)

The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL was originally owned and sponsored by a single for-profit firm, the Swedish company MySQL AB.

MySQL has changed ownership when Sun purchased MySQL in Janaury 2008 for $1B. Some 15 months later, before the ink could fully dry, Oracle bought Sun. This made MySQL a subsidiary of the Oracle Corporation.

Ever since Oracle has stepped into the picture, they have made good on their promises to make steady strides in MySQL development, which have come to fruition heretofore by means of better performance and configurability. However, older bugs still exist in MySQL, which Oracle has fixed fast enough for many in the MySQL community.

In light of this, and in keeping with spirit of open source liberty and freedom, forks of MySQL have surfaced in the Open Source DB World as viable alternatives:

MySQL can run on multiple platforms (32-bit and 64-bit)

  • Linux (Redhat Enterprise, Oracle Enterprise, Generic, Linux6 as for 5.5.17)
  • Sun Solaris
  • Mac OS X
  • Free BSD
  • Microsoft Windows
  • Source Code

MySQL features the use of several storage engines

Each Storage Engine has Distinct Properties that make efficient usage of data depending on

  1. Read Performance
  2. Write Performance
  3. Storage Requirements
  4. Memory Utilization
  5. Tuning the Engine Settings for
    • Internal Use
    • Multiple CPUs
    • OS Usage

For example, InnoDB has undergone a facelift which now allows it to take advantage of multiple CPU architectures. It was first introduced in MySQL 5.1.38 InnoDB Plugin. Those changes have now been fully incorporated in MySQL 5.5's InnoDB (Note: Percona Server already had these enhancements in 5.0 and 5.1. Oracle is nicely catching up). The necessary options have default settings that must be tuned to engage multicore activity.

Other third party storage engines have been used in MySQL including:

CLOUD DATABASES

Xeround Cloud Service Offers the XEROUND Storage Engine. It is ACID-compliant and a Whitepaper about it was released Feb 2012. The three storage engines supported are : XEROUND, MyISAM, and MEMORY.

8677 questions
20
votes
4 answers

Which database server scales better: PostgreSQL or MySQL?

I'm working on a website that could eventually have a very large database. The website will be an art community not until deviantART. I'll be running a lot of queries for analyzing how the site is used. I expect some of the queries to kill the…
epochwolf
  • 639
  • 3
  • 11
  • 16
20
votes
14 answers

Should I force my users to change passwords every n days/weeks/month?

Question says it all. We are designing a system where security is very important. One of the ideas someone had was to force users to change passwords every 3 months. My take on this is that while its more secure because the password changes often it…
Iznogood
  • 320
  • 3
  • 12
20
votes
5 answers

Can a MySQL slave be a master at the same time?

I am in the process of migrating 2 DB servers (Master & Slave) to two new DB Servers (Master and Slave) DB1 - Master (production) DB2 - Slave (production) DB3 - New Master DB4 - New Slave Currently I have the replication set up as: DB1 -> DB2 DB3…
mmattax
  • 1,304
  • 7
  • 19
  • 30
19
votes
6 answers

Backing up a MySQL database via ZFS snapshots

I've found a number of sites talking about doing exactly this, but I'm missing a few important details. The general steps are Run FLUSH TABLES WITH READ LOCK Take the ZFS snapshot Run UNLOCK TABLES Various sources report that InnoDB, which I'm…
Andy Shulman
  • 293
  • 3
  • 7
19
votes
2 answers

Tuning (and understanding) table_cache in mySQL

I ran the excellent MySQL performance tuning script and started to work through the suggestions. One I ran into was TABLE CACHE Current table_cache value = 4096 tables You have a total of 1073 tables. You have 3900 open tables. Current…
jotango
  • 475
  • 1
  • 5
  • 10
19
votes
5 answers

How to automatically kill slow MySQL queries after N seconds?

I am looking for a well tested bash script (or alternative solution) to do so, in order to avoid max_connection to be exhausted. I know that it is fighting the symptoms, but really need such script as a short term solution.
alfish
  • 3,127
  • 15
  • 47
  • 71
19
votes
3 answers

How fast is MySQL replication?

I'm considering setting up replication of our mysql db to be able to have local slaves in each of our branch offices, while having the master in the main office to improve application performance (significantly) at our branch offices. The db itself…
Steven Evers
  • 673
  • 5
  • 9
  • 23
19
votes
5 answers

Modifying columns of very large mysql tables with little or no downtime

I periodically need to make changes to tables in mysql 5.1, mostly adding columns. Very simple with the alter table command. But my tables have up to 40 million rows now and they are growing fast... So those alter table commands take several…
apptree
  • 345
  • 1
  • 3
  • 10
19
votes
9 answers

Architecture for highly available MySQL with automatic failover in physically diverse locations

I have been researching high availability (HA) solutions for MySQL between data centers. For servers located in the same physical environment, I have preferred dual master with heartbeat (floating VIP) using an active passive approach. The…
Warner
  • 23,756
  • 2
  • 59
  • 69
19
votes
2 answers

Cannot proceed because system tables used by Event Scheduler were found damaged at server start

I'm trying to copy data from one MySQL database to another on a different server using Navicat for MySQL. However, I keep getting this error when I try to do the transfer. I've run mysql_upgrade already and it completed, but I'm still getting this…
Wayne Molina
  • 915
  • 4
  • 13
  • 24
18
votes
6 answers

Can not access mysql docker

I am using docker-compose to create mysql container. I get host IP 172.21.0.2. But when I connect mysql. I get error: My docker-compose.yml: version: '2' services: ### Mysql container mysql: image: mysql:latest ports: -…
Quoc Dat
  • 183
  • 1
  • 1
  • 6
18
votes
1 answer

Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536

I'm running Ubuntu 16.04 Server on XenServer and I'm running into an issue with MySql's open file limit. Here's what I've done so far: sudo nano /etc/security/limits.conf (reference) * soft nofile 1024000 * hard nofile 1024000 * soft nproc 102400 *…
J Pierret
  • 181
  • 1
  • 1
  • 6
18
votes
1 answer

MySQL 5.7 bind-address doesn't work

I have always successfully set up a remote connection for MySQL 5.5. Today I installed a new server with Ubuntu 16.04 and MySQL 5.7. But for some reasons, I can't make this MySQL installation listen to other hosts but 127.0.0.1. Here is my…
ozahorulia
  • 282
  • 1
  • 2
  • 7
18
votes
3 answers

Can't find the private IP address for my Amazon-RDS instance

I moved my Master/slave database architecture to Amazon RDS and everything works fine. But I have a slave out of the RDS service which should keep sync with the new Master server, to do so I have to point my DB domain name master-db.myawsserver.com…
Imad Touil
  • 283
  • 1
  • 2
  • 6
18
votes
9 answers

How to set ulimits for a service starting at boot?

I need, for mysql to use large-pages, to set a ulimit - I've done this in limits.conf. However, limits.conf (pam_limits.so), doesn't get read in for init, only for "real" shells. I solved this before by adding a "ulimit -l" to the initscript start…
jayofdoom
  • 191
  • 1
  • 1
  • 4