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
14
votes
1 answer

Choosing a value for wait_timeout & interactive_timeout in MySQL config?

We have a live server that's being hit hard so we're tying to optimise everything we can. We ran the MySQLTuner script on it (http://mysqltuner.com/) which tells us we should set a value less than 28800 for wait_timeout & interactive_timeout.…
Bart B
  • 3,457
  • 6
  • 31
  • 42
14
votes
4 answers

Changing the mysql bind-address within a script

What would be the best way to change the mysql bind-address in the my.cnf from a shell script? Is there a way using a tool like mysqladmin or should I use sed or should I simply append it to the my.cnf and hope that the second entry overwrites the…
nonsenz
  • 371
  • 1
  • 2
  • 8
14
votes
1 answer

mysqldump error #1557: corrupt event table?

I just noticed the following error from my old mysql backup scripts: % mysqldump -hsql -uXXXX -pXXXX --events --all-databases > /dev/null mysqldump: Couldn't execute 'show events': Cannot proceed because system tables used by Event Scheduler…
user929352
  • 143
  • 1
  • 1
  • 4
14
votes
4 answers

How to reset or recover admin account password for MySQL?

I have a MySQL database that I "inherited" and I was not given the admin credentials. I do however have access to the box that it runs on. Is there a way to either recover the admin credentials or create new ones?
slolife
  • 375
  • 1
  • 5
  • 15
14
votes
6 answers

Connect to MySQL through command line without using root password?

I'm building a Bash script for some tasks. One of those tasks is create a MySQL DB from within the same bash script. What I'm doing right now is creating two vars: one for store user name and the other for store password. This is the relevant part…
ReynierPM
  • 710
  • 5
  • 14
  • 30
14
votes
9 answers

How to capture the queries run on MySQL server?

We're trying to do some server performance debugging and I would like to capture a snapshot of the queries being run on our MySQL server over a period of a couple minutes. I'm familiar with MySQL's SHOW FULL PROCESSLIST, however I'd like to be able…
hafichuk
  • 762
  • 2
  • 5
  • 18
14
votes
6 answers

Downtimeless MySQL backups on a budget

My current MySQL backup scenario is to replicate our db to a second server and run mysqldump on that server to remove any downtime from table or row locking. This is working well but costs $150 per month for the second server (Australian hosting is…
Christian
  • 789
  • 1
  • 13
  • 31
14
votes
1 answer

Mysqld.sock doesn't exist

I have a MySQL server running on Amazon EC2 in a VPC instance. I had to change the instance type of it to handle load and when I brought it back up, the socket didn't exist anymore. The file /var/run/mysqld/mysqld.sock doesn't exist and nor does…
Dave Long
  • 349
  • 1
  • 4
  • 15
14
votes
3 answers

What does MySQL Error 2013 mean?

I'm running mysqldump on a mysql server in a cron (as backup) and I'm getting warning messages like mysqldump: Got error: 2013: Lost connection to MySQL server during query when doing refresh What does this MySQL error (2013) mean? I've done some…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
14
votes
1 answer

How to restore mysql database from the physical files?

I just reinstalled my system, I didn't do dump backup but I still have the physical folder of my previous mysql installations. Is possible to use it to restore and update my current configuration?
John
  • 143
  • 1
  • 1
  • 4
14
votes
1 answer

How to disable keys in MySQL InnoDB tables?

Is it possible to disable keys in InnoDB tables? If yes, how? If not, why?
user12145
  • 1,115
  • 6
  • 28
  • 47
14
votes
3 answers

Redirect output of mysqldump to scp

I worked with a Linux pro years ago who did this nifty trick. He could do a mysqldump but redirect the output to an scp/ssh connection rather than writing to disk. We used this quite a bit where I used to work but I cannot remember how to do this…
xzyfer
  • 323
  • 1
  • 5
  • 12
14
votes
8 answers

"Error 1067: The process terminated unexpectedly" when trying to install MySQL on Win7 x64

I've run into a brick wall trying to install MySQL v5.5 on my machine. My PC is Windows 7 x64, Enterprise edition. MySQL installs fine, but when I run the "MySQL Instance Configuration Wizard", it pauses forever on the step "Start Service" (I can…
Contango
  • 1,150
  • 5
  • 15
  • 31
14
votes
9 answers

tail -f equivalent for MySQL logging database

It was decided that we should move to using a (MySQL) database for our application logs (it is a Java app using the logback lib). I am hoping to find something like tail -f that I can use with a specific table in that database that will show me new…
Nick Spacek
  • 251
  • 1
  • 2
  • 8
14
votes
5 answers

Prevent non-replication writes to MySQL slave?

We have some MySQL database servers set up with row-based replication, for performance. The software writes to the master, and reads from either the master or the slave. Everything's working great, for the most part. It's my understanding that…
Ken