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
72
votes
3 answers

How do I change the privileges for MySQL user that is already created?

I understand how to create a new user with privileges, but what is the correct way to change privileges for users that are already created? We are running a DB audit and some of the users have way more access then is needed. Plus I don't know the…
Clutch
  • 970
  • 1
  • 8
  • 13
71
votes
18 answers

`mysql_upgrade` is failing with no real reason given

I'm upgrading from MySQL 5.1 to 5.5, running mysql_upgrade and getting this output: # mysql_upgrade Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck FATAL ERROR: Upgrade failed Any ideas on where to look for what's happening…
Jim Rubenstein
  • 1,187
  • 1
  • 10
  • 16
70
votes
7 answers

How to force MySQL to connect by TCP instead of a Unix socket?

I would like to analyze mysql traffic. Right now, all mysql requests are sent to the MySQL unix socket: unix 2 [ ACC ] STREAM LISTENING 3734388 15304/mysqld /var/run/mysqld/mysqld.sock I'm trying to disable that socket to…
Max
  • 3,523
  • 16
  • 53
  • 71
69
votes
9 answers

Unknown/unsupported storage engine: InnoDB | MySQL Ubuntu

I recently upgraded from the previous LTS Ubuntu to Precise and now mysql refuses to start. It complains of the following when I attempt to start it: ╰$ sudo service mysql restart stop: Unknown instance: start: Job failed to start And this shows in…
Garrett
  • 823
  • 1
  • 7
  • 8
65
votes
12 answers

MySQL keeps crashing: InnoDB: Unable to lock ./ibdata1, error: 11

I have a simple webserver (Debian 6.0 x86, DirectAdmin with 1 GB of memory and still 10 GB free space, mySQl version 5.5.9), however the mySQL server keeps crashing and I need to kill all mySQL processes to be able to restart it…
Devator
  • 1,473
  • 4
  • 18
  • 37
64
votes
6 answers

How to rename a MySQL database?

How to rename a MySQL database? The MySQL online manual has said about the RENAME DATABASE command (this documentation page has been removed by Oracle some time ago): This statement was added in MySQL 5.1.7 but was found to be dangerous and was…
nalply
  • 1,087
  • 1
  • 10
  • 19
60
votes
7 answers

How to change my MySQL root password back to empty?

When I'm working locally, I don't really need to enter my password to access my database. I changed my root password when I first installed MySQL, but I don't know how to change my password back. What should I do?
Andrew
  • 3,453
  • 9
  • 33
  • 36
53
votes
4 answers

MySQL: creating a user that can connect from multiple hosts

I'm using MySQL and I need to create an account that can connect from either the localhost or from another server, i.e. 10.1.1.1. So I am doing: CREATE USER 'bob'@'localhost' IDENTIFIED BY 'password123'; CREATE USER 'bob'@'10.1.1.1' IDENTIFIED BY…
DrStalker
  • 6,946
  • 24
  • 79
  • 107
52
votes
4 answers

What is "freeable memory"?

Amazon RDS has a metric for 'freeable memory'. It appears to go up & down in a sawtooth pattern. This leads me to believe that it's memory that is being used by MySQL for caching and that when the cache expires, more freeable memory appears. Any…
Adam Nelson
  • 1,647
  • 3
  • 14
  • 12
49
votes
4 answers

MySQL warning "IP address could not be resolved"

I've got MySQL Master/Slave setup and I've noticed the following warnings in the mysql log files on both servers: [Warning] IP address 'xxx.xxx.xxx.xxx' could not be resolved: Name or service not known I've checked and the DNS lookups works fine…
HTF
  • 3,148
  • 14
  • 52
  • 82
49
votes
7 answers

What is the best Linux filesystem for MySQL (InnoDB)?

I tried to look for benchmark on the performances of various filesystems with MySQL InnoDB but couldn't find any. My database workload is the typical web-based OLTP, about 90% read, 10% write. Random IO. Among popular filesystems such as ext3, ext4,…
Continuation
  • 3,080
  • 5
  • 30
  • 38
48
votes
5 answers

How to export result of a MySQL query using phpMyAdmin 3.4.3?

I've got a 30K row table When I run a long, 50-line query on that table, a GROUP function reduces the number of rows to 7K I want to export the grouped 7K rows as a new table, or save them as a CSV When I attempt to export, instead of getting the…
grape
  • 481
  • 1
  • 4
  • 3
48
votes
8 answers

Why can't I connect to Amazon RDS after setting it up?

So, I just created the Amazon RDS account. And I started an instance of database. The "endpoint" is: abcw3n-prod.cbmbuiv8aakk.us-east-1.rds.amazonaws.com Great! Now I try to connect to it from one of my other EC2 instances. mysql -uUSER -pPASS…
Alex
  • 8,471
  • 26
  • 75
  • 99
46
votes
3 answers

How to check my PHP and MySQL version on Ubuntu VPS?

HI I am going to install MyBB but I am not sure whether I have installed the correct version of PHP and MySQL. PHP version 5.1.0 or above with XML Extension installed MySQL version 4.0 or above How to check that? Especiall the PHP XML…
DocWiki
  • 683
  • 2
  • 7
  • 8
45
votes
4 answers

What is the ibdata1 file in my /var/lib/mysql directory?

Logging in to my Webmin control panel, I noticed that virtually all of my disk space is full. I searched for the ten largest files/ directories on my system and found that a file called ibdata1 is taking up around 94GB of space. It resides in my…
James
  • 623
  • 2
  • 6
  • 13