Questions tagged [mysql]

MySQL is a free, open-source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs that all use their own dialects of SQL to manage the data. Always specify the exact version of the server in the question. Versions 5.x differ greatly in their capabilities from versions 8+.

MySQL is an Open Source RDBMS (Relational Database Management System) that runs as a server providing multi-user access to several databases. Its source code is available under the GNU GPL (General Public License). MySQL was acquired by Oracle in 2009.

MariaDB is a fork of MySQL using the same dialect of SQL and offering most of the same functions. See for fork-specific questions and answers.

MySQL offers standard database driver connectivity for using MySQL with applications and tools compatible with industry standards ODBC and JDBC.

How to ask a good and answerable question

Please see this post: Tips for asking a good Structured Query Language (SQL) question to get tips on how to ask a question about MySQL. Following some of these steps will help people to help you solve your problem.

Minimal, reproducible examples help the Stack Overflow community give good answers. Please read Why should I provide a Minimal Reproducible Example for a very simple SQL query?.

Always specify the exact version of the server in the question. Versions 5.x differ greatly in their capabilities from versions 8+.

Pronunciation

Officially it is /maɪˌɛskjuːˈɛl/ ("My S-Q-L"), but is often pronounced /maɪˈsiːkwəl/ ("My Sequel").

Latest Version (MySQL Community Server 8.0.27) and Version History

Example

SELECT * FROM users ORDER BY name

Resources

MySQL Tutorials

Popular questions

Popular administration tools

Chat Room

Related tags

661202 questions
78
votes
8 answers

Native table 'performance_schema'.'???' has the wrong structure

I am getting the following: Native table 'performance_schema'.'file_instances' has the wrong structure Native table 'performance_schema'.'cond_instances' has the wrong structure Native table 'performance_schema'.'rwlock_instances' has the wrong…
CarbonMan
  • 4,350
  • 12
  • 54
  • 75
78
votes
10 answers

MySQL vs PostgreSQL? Which should I choose for my Django project?

My Django project is going to be backed by a large database with several hundred thousand entries, and will need to support searching (I'll probably end up using djangosearch or a similar project.) Which database backend is best suited to my project…
rmh
  • 4,806
  • 10
  • 33
  • 31
78
votes
6 answers

How to rearrange MySQL columns?

I need to move the position of existing columns (for better visibility). How can this be done without affecting the data?
Yeti
  • 5,628
  • 9
  • 45
  • 71
78
votes
5 answers

How to auto-load MySQL on startup on OS X Yosemite / El Capitan

After upgrading OS X my install of MySQL stopped loading on startup. This walk-through on MySQL says: "The Startup Item installation adds a variable MYSQLCOM=-YES- to the system configuration file /etc/hostconfig. If you want to disable the …
Justin
  • 26,443
  • 16
  • 111
  • 128
78
votes
35 answers

Laravel Migration table already exists, but I want to add new not the older

I previously created users table. Now I have created a new migration to create a new books table inside my schema. When I try to run the command php artisan migrate It shows: [Illuminate\Database\QueryException] SQLSTATE[42S01]: Base table or view…
MD. Atiqur Rahman
  • 2,063
  • 4
  • 17
  • 30
78
votes
10 answers

Can't connect to MySQL server on '127.0.0.1' (10061) (2003)

I know this question was asked a lot before but I tried some of the solutions which were given and nothing worked. I have downloaded MySQL Workbench 6.1 on my windows 7 x64 and now as I want to start and do a simple DB I set a new MySQL Connection…
Zee E.
  • 849
  • 1
  • 9
  • 9
78
votes
9 answers

Is there a Profiler equivalent for MySql?

"Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful during development, testing and when I am debugging…
Andrew Rimmer
  • 3,882
  • 6
  • 30
  • 35
78
votes
3 answers

How to deploy local MySQL database to Heroku

I'm new to using Heroku and I have a Ruby/Sinatra app in which I plan on using a MySQL database as the main data store. However, I do not want to write results directly to the database on Heroku. Instead, I want to write the results to a local…
Ken
  • 1,498
  • 2
  • 12
  • 19
78
votes
4 answers

MySQL ORDER BY IN()

I have a PHP array with numbers of ID's in it. These numbers are already ordered. Now i would like to get my result via the IN() method, to get all of the ID's. However, these ID's should be ordered like in the IN method. For example: IN(4,7,3,8,9) …
Henk Denneboom
  • 1,573
  • 3
  • 15
  • 18
78
votes
9 answers

Pentaho Data Integration SQL connection

I am using Pentaho Data Integration and I am trying to connect to my database via MySQL but when I do I get this error..... Error connecting to database [devdb2] : org.pentaho.di.core.exception.KettleDatabaseException: Error occured while trying to…
user979331
  • 11,039
  • 73
  • 223
  • 418
78
votes
7 answers

Allow all remote connections, MySQL

I had been using SQL Server and am now using MySQL for a project. With SQL Server, our developers can connect to the remote database on their local machines if they know the host, username, password. With MySQL, though, to give a developer access…
stephen.hanson
  • 9,014
  • 2
  • 47
  • 53
77
votes
9 answers

How to use MySQL dump from a remote machine

How can I backup a mysql database which is running on a remote server, I need to store the back up file in the local pc.
Harsha
  • 3,548
  • 20
  • 52
  • 75
77
votes
5 answers

Select from one table where not in another

I'm trying to find the rows that are in one table but not another, both tables are in different databases and also have different column names on the column that I'm using to match. I've got a query, code below, and I think it probably works but…
Drahcir
  • 11,772
  • 24
  • 86
  • 128
77
votes
2 answers

MySQL TEXT vs BLOB vs CLOB

What are the differences, advantages and disadvantages of these different data-types both from a performance standpoint as well as a usability standpoint?
Jake Wilson
  • 88,616
  • 93
  • 252
  • 370
77
votes
2 answers

PHP MYSQL UPDATE if Exist or INSERT if not?

I have no idea if this is even remotely correct. I have a class where I would like to update the database if the fields currently exist or insert if they do not. The complication is that I am doing a joining 3 tables (set_colors, school_art,…
GGcupie
  • 1,003
  • 1
  • 8
  • 11
1 2 3
99
100