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
493
votes
23 answers

mysqldump throws: Unknown table 'COLUMN_STATISTICS' in information_schema (1109)

Every time I try to make a mysqldump I get the following error: $> mysqldump --single-transaction --host host -u user -p db > db.sql mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')…
manifestor
  • 6,079
  • 7
  • 27
  • 39
310
votes
8 answers

How to bind MySQL server to more than one IP address?

Is there a secret way to bind MySQL to more than one IP address? As far as I can see the bind-address parameter in the my.cnf does not support more than one IP and you can't have it more than once.
BlaM
  • 3,886
  • 5
  • 27
  • 28
223
votes
13 answers

How do I load a sql.gz file to my database? (importing)

I'm trying to import a gzipped SQL file into mysql directly. Is this the right way? mysql -uroot -ppassword mydb > myfile.sql.gz
Alex
  • 8,471
  • 26
  • 75
  • 99
135
votes
10 answers

Is there an equivalent of MySQL's SHOW CREATE TABLE in Postgres?

Is there an equivalent of MySQL's SHOW CREATE TABLE in Postgres? Is this possible? If not what is the next best solution? I need the statement because I use it to create the table on an remote server (over WCF).
vlebar
  • 1,453
  • 2
  • 9
  • 4
124
votes
2 answers

How can I show user's privileges in MySQL?

I know that I can set user's privileges in the following simple way: grant all on [database name].[table name] to [user name]@[host name]; But how can I see existing privileges? I need to see data similar to those which are used in grant. In other…
Roman
  • 2,569
  • 10
  • 32
  • 32
118
votes
2 answers

Why does the MySQL command line tool ignore the --port parameter?

This is what I'm doing: mysql --host=localhost --port=9999 mysql -u root -p --execute="show tables;" The command works (connecting to port 3306) no matter what I provide in --port argument. I have two mysql servers running on one machine, and want…
yegor256
  • 1,836
  • 3
  • 16
  • 30
116
votes
5 answers

Postgres equivalent to MySQL's \G?

Does anyone know if Postgres has a way to display query results "prettily", like how MySQL does when ending a query with \G on the command line? For instance, "select * from sometable\G" as opposed to "select * from sometable;" Many thanks!
law
  • 1,490
  • 3
  • 11
  • 11
110
votes
1 answer

InnoDB: Error: log file ./ib_logfile0 is of different size

I just added the following lines in /etc/mysql/my.cnf after I converted one database to use InnoDB engine. innodb_buffer_pool_size = 2560M innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit =…
jack
  • 1,725
  • 5
  • 21
  • 25
100
votes
9 answers

mysqldump to a tar.gz

Usually after dumping a MySQL database with mysqldump command I immediately tar/gzip the resultant file. I'm looking for a way to do this in one command: So from this: mysqldump dbname -u root -p > dbname.sql tar czvf dbname.sql.tgz dbname.sql rm…
pygorex1
  • 1,181
  • 2
  • 9
  • 10
99
votes
11 answers

How can I export the privileges from MySQL and then import to a new server?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server. For extra points, there are a couple of existing databases on the new one already, how do I import the old servers…
Gareth
  • 8,573
  • 13
  • 44
  • 44
91
votes
8 answers

How can I show mysql locks?

Is there anyway to show all the locks that are active in a mysql database?
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
89
votes
6 answers

Changing host permissions for MySQL users

I have the following grants for a user/database mysql> SHOW GRANTS FOR 'username'@'localhost'; +---------------------------------------------------------------------------+ | Grants for username@localhost …
f00860
  • 1,203
  • 1
  • 9
  • 12
85
votes
11 answers

Where is my mysql log on OS X?

I checked /var/log and /usr/local/mysql and i can't seem to find the log. I am trying to troubleshoot an error establishing a database connection with a php function.
Tony
  • 4,213
  • 11
  • 35
  • 29
83
votes
10 answers

How to check what port mysql is running on

On my windows dev box mysql is running on port 3306 How can I check what port it is running on the unix server that I have to upload the app to.
Ankur
  • 2,379
  • 7
  • 22
  • 24
78
votes
9 answers

What is the debian-sys-maint MySQL user (and more)?

I have been bitten several times by the 'debian-sys-maint' user that is installed by default on the mysql-server packages installed from the Ubuntu repositories. Generally what happens is I pull a fresh copy of our production database (which is not…
Joe Holloway
  • 1,909
  • 3
  • 19
  • 17
1
2 3
99 100