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
16
votes
5 answers

How do you choose a MySQL database engine

In particular, how do you choose between MyISAM and InnoDB, when neither is missing a required feature (e.g. you don't need foreign keys). Does it always come down to trying both and measuring? Or are there good rules of thumb regarding the number…
Tony Meyer
  • 889
  • 1
  • 13
  • 25
16
votes
1 answer

mysqldump of latest 1000 records

how to take mysqldump of latest 1000 records from a database
bvishal4u
  • 316
  • 1
  • 3
  • 7
16
votes
5 answers

Should I install 32-bit database or 64-bit database?

(I've read a lot about 64-bit versus 32-bit OS/Apps, but this question is specifically in regards to databases.) I'm trying to understand the pros and cons of 32-bit versus 64-bit databases, and namely, under what conditions that it starts to make…
JohnB
  • 497
  • 2
  • 6
  • 12
16
votes
3 answers

MySQL dump, output each table row on a new line whilst using --extended-insert

I'm having an issue, where for ease of use, I'd like to be able to format a command line MySQL dump so that each row of a given table is on a new line when using the --extended-insert option. Usually when using --extended-insert, every row of a…
soopadoubled
  • 183
  • 2
  • 8
16
votes
3 answers

mysqldump doesn't create tables or import any data

I am trying to import a mysqldump into a new database. When I run: mysqldump -umydbuser -p --database testimport < database.dump I get the following output: Enter password: -- MySQL dump 10.11 -- -- Host: localhost Database: testimport --…
George
  • 283
  • 1
  • 2
  • 7
16
votes
6 answers

How to improve MySQL INSERT and UPDATE performance?

This question can probably be asked on StackOverflow as well, but I'll try here first... Performance of INSERT and UPDATE statements in our database seems to be degrading and causing poor performance in our web app. Tables are InnoDB and the…
mmattax
  • 1,304
  • 7
  • 19
  • 30
16
votes
1 answer

mariadb.service start stuck at activating

I just installed the mariadb in my ubuntu 19.10 by sudo apt install mariadb-server mariadb-client after when I am trying to start the server by sudo systemctl start mariadb.service shell get freeze I have to use Ctl+c to get shell running. In the…
Sarthak Kumar
  • 263
  • 1
  • 2
  • 5
15
votes
5 answers

"MySQL server has gone away" when attempting to import a large dump file

I am trying to import a MySQL dump file. The file was created on a Linux server, I am trying to import on windows I logged into the command line and ran: SOURCE c:/dump.sql But this seems to have thrown up some character set problems (specifically…
Jeremy French
  • 675
  • 3
  • 12
  • 25
15
votes
3 answers

MySQL access denied error when connecting via SSH tunnel

For months I've been connecting to the MySQL instance running on our local test server through an SSH tunnel without any issues. All of sudden though, with no changes I can think of, the server has started rejecting the log in attempt from Sequel…
Adam
  • 253
  • 1
  • 2
  • 7
15
votes
5 answers

MySQL doesn't logs error to new file after rotating?

Problem solved but I'm writing down for the future reference. /root/.my.cnf [mysqladmin] user = root password = pa$$w0rd /etc/logrotate.d/mysql /var/log/mysql-slow.log /var/log/mysqld.log { daily rotate 7 dateext …
quanta
  • 51,413
  • 19
  • 159
  • 217
15
votes
3 answers

MySQL Error: (2003, "Can't connect to MySQL server on '2001:db8:81:2c::2' (-9)")

I'm trying to set up Zenoss 4.2.0 on CentOS 6.3 to monitor a remote MySQL 5.5.25a server via IPv6. The firewall is open for the monitoring server and I can connect fine from the command line: [root@zenoss ~]# mysql -u zenoss -p -h…
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
15
votes
3 answers

MySQL Replication Performance

I'm having a serious issue with MySQL 5.5 replication performance between two machines, mostly myISAM tables with statement based replication. The binary logs and mysql data directory are both located on the same Fusion ioDrive. The problem was a…
Nick
  • 153
  • 1
  • 6
15
votes
4 answers

How does mysql determine the hostname of its clients?

I'm trying to create a MySQL user which will only be allowed to connect to the MySQL database from a specific hostname. grant all on db_name.* to 'user_name'@'appserver-lan.mydomain.com' identified by 'some_passwd' By checking the user table on…
Luis Fernando Alen
  • 540
  • 1
  • 5
  • 11
15
votes
6 answers

What causes the MySQL error 1062 - duplicate entry when starting slave?

MySQL Master version: 5.5.16-1 MySQL Slave version: 5.5.18-1 The master's snapshot is created by: mysql> FLUSH TABLES WITH READ LOCK; shell> mysqldump --all-databases --master-data > dbname_`date +%F`.sql This dump file is imported on the slave…
quanta
  • 51,413
  • 19
  • 159
  • 217
15
votes
11 answers

Hidden features of MySQL

In the long tradition of having hidden features, let us have a list of hidden features in MySQL. Do put one feature per answer. Also See: Hidden Features of Linux Hidden Features of PowerShell Hidden features of Oracle Database Hidden Features of…
Binoj Antony
  • 267
  • 5
  • 14