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.

8539 questions
434
votes
19 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
  • 5,329
  • 5
  • 21
  • 33
305
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,816
  • 5
  • 26
  • 27
205
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,111
  • 24
  • 71
  • 99
125
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,353
  • 2
  • 8
  • 4
119
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,439
  • 9
  • 32
  • 32
117
votes
1 answer

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,806
  • 3
  • 16
  • 29
109
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,705
  • 5
  • 21
  • 24
107
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,400
  • 3
  • 10
  • 11
98
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,151
  • 1
  • 9
  • 10
97
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,413
  • 13
  • 43
  • 44
87
votes
7 answers

How can I show mysql locks?

Is there anyway to show all the locks that are active in a mysql database?
Amandasaurus
  • 30,211
  • 62
  • 184
  • 246
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,369
  • 7
  • 22
  • 24
82
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,053
  • 10
  • 34
  • 29
80
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,113
  • 1
  • 8
  • 12
75
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,829
  • 3
  • 19
  • 17
1
2 3
99 100