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

Mysqldump complains about chosen databases regardless of command line

Mysqldump complains about command line options I have never specified. I don't have shell aliases nor a custom .my.cnf file set. What am I doing wrong? Using the --database long option: $ mysqldump --user cloud -p --database cloud >…
andyn
  • 362
  • 3
  • 6
26
votes
4 answers

MySQL server PID file could not be found

I can start MySQL fine, /usr/local/mysql/support-files/mysql.server start Starting MySQL SUCCESS! But any MySQL action after that I get the error: MySQL server PID file could not be found /usr/local/mysql/support-files/mysql.server…
simpleengine
  • 405
  • 1
  • 4
  • 6
26
votes
3 answers

What value of thread_cache_size should I use?

I'm using Asp.Net together with MySQL. In the .Net connection string, I have set Max Pool Size to 150. If I run the following I get these values: SHOW GLOBAL STATUS LIKE 'max_used_connections'; gives 66 SHOW GLOBAL STATUS LIKE 'Threads_created';…
Martin
  • 379
  • 1
  • 3
  • 11
26
votes
6 answers

From a shell script, how can I check whether a MySQL database exists?

mysqladmin -uroot create foo returns an exit status of 1 if foo exists, and 0 otherwise, but of course it will also create the database if it doesn't already exist. Is there some easy way to simply check whether a database exists?
ithinkihaveacat
  • 1,624
  • 3
  • 14
  • 18
25
votes
3 answers

How can I back up a table structure but NOT its data in MySQL

I am using MySQL Administrator for making my database backup. I can perfectly back up the whole database with all its tables. There are some tables whose size is very big so I wonder if I could only back up the tables' structure (only their…
user16629
25
votes
2 answers

When to use a MySQL socket and when to use a host:port?

Many applications allow me to connect to Mysql using a username, password host and port. Some allow me to configure a socket instead of the host:port. Is there any clear benefit of one over the other? I can imagine that a socket only works when…
berkes
  • 2,205
  • 3
  • 18
  • 19
25
votes
7 answers

What should mysqld.sock contain, why don't I have it?

Does anyone know why my /var/run/mysqld/mysqld.sock socket file would not be on my computer when I install (or reinstall) MySQL 5.1? Right now, when I try to start up a server with mysqld, I get errors like Can't connect to local MySQL server…
egbutter
  • 353
  • 1
  • 3
  • 7
25
votes
7 answers

How many selects per second can a mysql server run?

I'm writing a business plan and I have to simulate the cost when my website will be reach from 500,000 unique visitors. visitors: 500,000 pageviews: 1,500,000 spider pageviews: 500,000 total pageviews: 2,000,000 Each page does 50 queries…
Simone
25
votes
2 answers

What kind of server do I need to handle 10 million requests and mySQL queries a day?

I'm a newbie of server administration and I'm looking for a powerful hosting service to host my new website. This website is basically a back-end of an mobile online game, and it will: handle up to 10 million of HTTPS request and mySQL queries a…
Calvin
  • 361
  • 1
  • 4
  • 4
24
votes
6 answers

Connecting to MySQL from PHP is extremely slow

I just did a fresh install of XAMPP. When first opening PHPMyAdmin I noticed it was extremely slow. It didn't make sense that on localhost it should take almost 5 seconds for every page to open. I made a small test case to shift the blame off…
Hubro
  • 1,138
  • 4
  • 16
  • 35
24
votes
6 answers

Enable passwordless access to MySQL

How can I delete my password for MySQL? I dont want to have a password to connect to the database. My server is running Ubuntu.
Ben
  • 775
  • 4
  • 9
  • 19
23
votes
16 answers

Why is it bad to have a weak mysql user password?

I was presented with an argument to the tune of "you don't need a strong mysql user password because in order to use it, they'd already have access to your server." We're talking about a 4 digit password that is a standard english dictionary word on…
Citizen
  • 560
  • 6
  • 16
23
votes
5 answers

Scripted install of MySQL on Ubuntu

I need to write a script that will build my server from a fresh Ubuntu server install. Among things like Apache and PHP it needs to install MySQL. The only problem here is that when I install MySQL with apt-get, at some point the installation will…
Luke
  • 3,826
  • 8
  • 36
  • 40
22
votes
9 answers

Unable to connect to mysql through JDBC connector through Tomcat or externally

I've installed a stock mysql 5.5 installation, and while I can connect to the mysql service via the mysql command, and the service seems to be running, I cannot connect to it through spring+tomcat or from an external jdbc connector. I'm using the…
Stefan Kendall
  • 1,079
  • 3
  • 17
  • 33
22
votes
6 answers

Alter charset and collation in all columns in all tables in MySQL

I need to execute these statements in all tables for all columns. alter table table_name charset=utf8; alter table table_name alter column column_name charset=utf8; Is it possible to automate this in any way inside MySQL? I would prefer to avoid…
The Disintegrator
  • 585
  • 2
  • 6
  • 20