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
15
votes
2 answers

Is it ok to replicate the `mysql` database?

When I originally set up my master-to-master replication, I used: binlog-ignore-db=mysql and have been syncing the user accounts and grants manually. This is simply how it was done in the how-to I was using at the time. But is there any reason…
dlo
  • 471
  • 1
  • 4
  • 15
15
votes
2 answers

How to create a local backup of a remote Amazon RDS MySQL database?

How do I create a local backup of a remote Amazon RDS MySQL database? What I need to know is how to make a complete full local backup of a MySQL database (not a remote Amazon snapshot) that can be used to restore to a new database anywhere, on any…
djangofan
  • 4,182
  • 10
  • 46
  • 59
15
votes
3 answers

Mysql Export current configuration to a file

We lost our my.cnf file and were wondering if there is a way to export a copy from the currently running mysql instance. Thanks!
samspot
  • 327
  • 1
  • 3
  • 7
15
votes
4 answers

Can't backup the mysql table with mysqldump. SELECT,LOCK TABL command denied for 'cond_instances'

I am having trouble running mysqldump as the mysql root user. When I try to backup the mysql table I get this error: mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK…
bryan kennedy
  • 1,721
  • 3
  • 16
  • 31
15
votes
3 answers

How do I setup monitoring of MySQL with Fail2ban?

Searching the internet with search engines on MySQL and fail2ban yields lots of results on putting your fail2ban logs into MySQL, however I'm wanting to monitor failed MySQL attempts to log in and ban those IP's. My application requires that I keep…
InvisibleFrisbee
  • 363
  • 1
  • 3
  • 8
15
votes
4 answers

How to know storage engine used of a database?

Previously, on every database created, I use: mysql -u root -p CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL ON dbname.* TO 'dbuser'@'localhost'; and then use the database without thinking about MyISAM or InnoDB How to know…
cewebugil
  • 715
  • 3
  • 9
  • 12
15
votes
3 answers

How do I create a read only MySQL user for backup purposes with mysqldump?

I'm using the automysqlbackup script to dump my mysql databases, but I want to have a read-only user to do this with so that I'm not storing my root database password in a plaintext file. I've created a user like so: grant select, lock tables on *.*…
stickmangumby
  • 526
  • 2
  • 5
  • 11
15
votes
6 answers

Mysql - Access denied for user 'root'@'x.x.x.x'

I am trying to connect to a remote mysql database from my local box. Initially I was not even able to hit the mysql db. But after commenting the binding_address in the my.cnf file and restarting the mysql server, I am now able to hit it. But now, I…
bragboy
  • 337
  • 1
  • 2
  • 9
15
votes
5 answers

MySQL process goes over 100% of CPU usage

I'm experiencing some problems with my LAMP server. Recently everything became very slow, even though visitor count on my websites didn't change to much. When I run top command, it says that MySQL process has taken over 150-200% of CPU. How's that…
Temnovit
  • 1,127
  • 6
  • 19
  • 27
15
votes
5 answers

Can I run mysqld on top of glusterfs?

I have been playing with glusterfs recently. What I want to try is to run mysqld on top of the glusterfs in a similar way as it is possible to run MySQL on top of DRBD. I am familiar with MySQL replication and the advantages of using that instead…
Richard Holloway
  • 7,456
  • 2
  • 25
  • 30
15
votes
3 answers

Too many MySQL processes

I'm trying to help a friend with his server after he told me his MySQL was using too much memory... It turns out it's not only using a lot of memory, but there are way too many mysql process running! Here's the result of ps auxww|grep mysql:…
user24994
  • 293
  • 1
  • 3
  • 6
14
votes
4 answers

How to install and start multiple MySQL instances on Windows 2012

I just installed MySQL 5.7 on Windows 2012 VM. I am trying to create and run multiple instances but very frustrated that such a simple thing is not working. I installed MySQL in C:\Program Files\MySQL\MySQL Server 5.7 which is default location and…
Frank Martin
  • 741
  • 2
  • 12
  • 24
14
votes
5 answers

How to drop all tables in a MySQL database without dropping the database?

I need to drop all the tables in a database without knowing their names beforehand. The typical procedure is to drop and then recreate the database but this is not an option. What is the best way to do it?
Angel Chiang
  • 431
  • 1
  • 4
  • 9
14
votes
8 answers

Where is systemd script for mysql.service located?

I am actually using MariaDB (drop-in replacement for MySQL). I'm trying to make some changes to my systemd mysql.service file. I can see it exists because running sudo systemctl lists it and indicates that it is loaded / active / running. The issue…
David Mackey
  • 697
  • 2
  • 15
  • 30
14
votes
5 answers

What is the best way to monitor a production server?

We are running two production servers with Apache 2 and MySQL. I am looking for a reliable way of monitoring our load, stability and uptime. I have come across monit, but are there better alternatives?
user12828