MySQL is an Open Source database now owned by Oracle. The MySQL documentation is expansive and incredibly useful.

learn more… | top users | synonyms

44
votes
4answers
471k views

mysql how to fix Access denied for user 'root'@'localhost'

Before I screw up something, when login using $ mysql -u root -p, and show databases: +--------------------+ | Database | +--------------------+ | information_schema | | mysql |...
41
votes
2answers
77k views

How to remove 1000-row limit in MySQL Workbench queries?

During execution of an SQL Query in MySQL Workbench, the query is automatically limited to 1000 rows. How does one prevent the tool from imposing this limit?
33
votes
5answers
39k views

How do I stop services from starting on boot on Ubuntu?

I have lots of servers installed (Apache, MySQL, etc.), but I don't want them all to start at boot time (they drain power, and I'm on batteries most of the time). How do I configure this?
31
votes
3answers
35k views

Disable MySQL startup in Ubuntu 10.04

I want to prevent MySQL from starting in Ubuntu 10.04 I have used update-rc.d -f mysql remove and confirmed that there is no link to the /etc/inid.d/mysql script from any of the rc?.d directories. ...
27
votes
8answers
4k views

Can a massive MySQL data import on an SSD damage it?

I have to import quite a lot of data (~100 million rows, ~100 times) into a MySQL database. Currently, it is stored on my hard disk drive, and the bottleneck of my import seems to be the hard disk ...
24
votes
2answers
14k views

Symlink error when installing MySQL via Homebrew

Trying to install MySQL via Homebrew. The install seems to work fine but i get an error: "Error: The linking step did not complete successfully The formula built, but is not symlinked into /usr/local ...
22
votes
4answers
64k views

Sync Two MySQL Databases

What is a good way to sync two MySQL databases? I would like to sync the data in my production website's database to my local development database. Right now, I am just using the PHPMyAdmin ...
22
votes
4answers
34k views

How to export mysql schema from phpmyadmin?

I have a huge db that hangs the server if I try to export it, is there a way I can export it without all the data? Only the tables structure.
21
votes
2answers
12k views

Pipe gunzip and mysql to gunzip a dump and import it

I have a .gz sql dump file (example: foo.sql.gz) that i want import in my database with the classic mysql command. gunzip -c foo.sql.gz > foo.sql mysql -uroot -ppassword foo < foo.sql foo is ...
21
votes
4answers
77k views

What steps do I need to take to completely uninstall MySQL?

I have installed and uninstalled MySQL Server for about 100 times. Each time I reinstall the thing, it shows the same configurations, which I think cause problems. I would like to get rid of all ...
20
votes
7answers
71k views

How to remove MySQL service from Windows

I've removed all MySQL programs from my Win7 64bit desktop and I still have the MySQL service.How can I remove it? MySQL programs I removed: MySQL Community Server 5.1 MySQL Community Server 5.5 ...
19
votes
2answers
19k views

create mysql database with one line in bash

Is it possible to create an empty database with one line of command in bash? My newbie attempts have failed: mysql -uroot $(create database mydatabase;) I end up having to mysql -uroot create ...
19
votes
4answers
25k views

how do I see which user I am logged in as in MySQL?

I have multiple text console session open and log in as different users into different consoles. I forget after while which consoles belong to which user, it would be nice to not have to quit and log ...
18
votes
1answer
71k views

How to manually install Apache, PHP and MySQL on Windows?

How do I install Apache with PHP support and the MySQL server on Windows without using any ready-to-use packages like WAMPServer or XAMPP ?
17
votes
4answers
5k views

MySQL command line color prompt

I want to add colors to the MySQL command line color prompt. I have so far in a script (database.sh): mysql -uroot -hlocalhost -A --prompt="\u@\h:\d> " I would like root to be red, @ to be blue,...
16
votes
3answers
45k views

How to drop all MySQL tables from the command-line?

Usually I open Terminal.app and connect to a remote MySQL database. Then I use this command to drop a table: mysql> drop table [table name]; But what I need is the command line to drop all ...
15
votes
1answer
5k views

MySQL Preference Pane control for MySQL installed via Homebrew

this is a repost of my question at apple.stackexchange.com I have installed MySQL via homebrew: brew install mysql. I'd like to get the MySQL preference pane hooked up to my installation of MySQL ...
13
votes
2answers
42k views

How to exit MySQL command prompt?

I have installed MySQL. Now I am stuck inside the MySQL command prompt. I ran MySQL like this: C:\>mysql.exe mysql> Then I type in some invalid command like this: mysql> /version ->...
13
votes
6answers
32k views

systemctl enable differs from systemctl start, how?

I am running an Arch Linux (latest, up-to-date) box, and attempting to get MySQL to start at boot. With the systemd package installed I have systemctl available, and as such I can do things like this: ...
12
votes
4answers
53k views

How to restart MySQL

I am running MySQL 5.1.54 and installed it on Ubuntu through the terminal using the command sudo apt-get install mysql-server I changed the my.cnf file and would like to stop and then start the ...
12
votes
3answers
16k views

How do I uninstall MySQL on Mac OS X (Snow Leopard)?

I had installed MySQL from the command line when I setup a local web server with custom modules on my Snow Leopard box. I recently discovered MAMP and its just easier to work with it than with the ...
11
votes
2answers
51k views

MySQL InnoDB lost tables but files exist

I have a MySQL InnoDB which has all the database table files, but MySQL doesn't see them, and isn't loading them. The problem happened because I deleted these three files: ibdata1, ib_logfile0 and ...
11
votes
6answers
13k views

MySql client for Linux

What MySql client are you using for Linux. I currently use PhpMyAdmin and the Mysql Query Browser but I would like something similar to Toad or HeidiSql that I use on windows. One with SQL code ...
11
votes
1answer
20k views

Anyway to use SSMS to connect to MySql?

I've grown to love SQL server management studio (ssms), I realise that it is not naturually compatible, however is there a way of connecting to MySQL? Perhaps using an ODBC connection? I realise ...
10
votes
3answers
14k views

Auto-restart mysql when it dies

I have a rackspace server that I have been renting to run my personal projects upon. Since I am cheap, it has 256Mb of RAM and honestly can't handle alot. Every once in a while, when there is a sharp ...
9
votes
3answers
16k views

How to install the MySQL Ruby Gem on Ubuntu 9.10?

I am having a problem installing the Ruby Gem for MySQL. This is the command that I am running: sudo gem install mysql and this is the output that I'm getting: Building native extensions. This ...
9
votes
9answers
32k views

MySQL won't start!

I'm getting this error when trying to log into MySQL from the command line: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I think this ...
9
votes
1answer
8k views

View existing indexes using phpMyAdmin

Using phpMyAdmin, is it possible to view existing indexes on a table? If so,how? One of my tables should have an unique index with two keys, and I want to confirm it exists.
9
votes
5answers
48k views

Install MySQL 5.5 on Ubuntu 10.04

How to install the MySQL 5.5 on Ubuntu 10.04? apt-get install mysql-server is only allows to install 5.1.41.3ubuntu12
9
votes
3answers
6k views

Can't reset MySQL (MariaDB) root password

Today, I wanted to create a database in PMA. It said: "Cannot log in to the MySQL server". I tried via a terminal, same problem, and it is because my password is wrong. And I can't understand why. I ...
9
votes
5answers
3k views

How can i retreive a mysql database from a hard drive?

My mythtv box crashed because of a corrupted hard drive. I can see my data when connected it to another computer. I need to know how I can retrieve the database so I can load it on my new drive.
8
votes
4answers
14k views

phpmyadmin symlinks error after ubuntu upgrade

After the upgrade of my ubuntu server to 13.04 my phpmyadmin is no longer reachable. the browser reports 500 (internal server error) and in the error.log it says: PHP Fatal error: require_once(): ...
8
votes
9answers
25k views

Configuring a MySQL 5.1 Instance on Windows 7 Professional x64 Fails

I'm trying to set up my laptops to function as mobile development environments. Installing the software on my Linux machine and getting it configured was fairly straightforward, however I'm having ...
8
votes
2answers
5k views

MySQL binds to port 3307 not port 3306

I am running OS X Yosemite 10.10.5 on a late-2014 Mac Mini. It's my development server. I've just installed MySQL on this machine: 'mysql --version' reports the version is 'mysql Ver 14.14 Distrib 5....
8
votes
1answer
5k views

Make the table listing show entire fields

I'd like to know if a way exists to make PHPMyAdmin show entire fields in the table browsing tab. Right now I have a TEXT field and I can never read the entries in their entirety. How can I do that?
8
votes
3answers
5k views

Debian - Can't stop MySQL; permissions?

I just tried to upgrade from debian squeeze to unstable by replacing 'squeeze' with 'unstable' in /etc/apt/sources.list. The upgrade went smoothly except for mysql, which failed because it couldn't ...
8
votes
3answers
5k views

I can't open phpMyAdmin, get error 301 or 500

I've installed phpMyAdmin, but I can't open it on any browser: I get a 301 redirect(*) if I browse to http://localhost:8080/phpmyadmin. If I add a / to the end of the addres, I get a 500 error status ...
8
votes
2answers
5k views

How can I limit the number of child processes that MySQL spawns?

Is there a way to limit the number of children than mysqld spawns? Or should one not worry about that? My VPS only has 512MB of RAM. Here's the output of htop, after I set max_connections to 6 and ...
7
votes
3answers
8k views

Difference between mysql, mysql-server, mysql-client in Linux

I've installed mysql, mysql-server or mysql-client on Linux. What is the difference between them?
7
votes
1answer
5k views

File not found error with mysqlimport

I'm setting up a local database for gene annotation following the instructions on this page. They provide an .sql file to create some MySQL table structures (step 4) and several data files to populate ...
7
votes
2answers
8k views

What does the MySQL “max_allowed_packet” setting actually control?

We've been cleaning up database problems for the last four hours, thanks to a broken mysqldump that wasn't sufficiently erroring out. We were getting these errors: mysqldump: Error 2020: Got packet ...
7
votes
1answer
7k views

MySQL database across multiple servers

Ok, really don't know how to ask what I am looking to find out which is likely why my reading and research otherwise is yielding nothing relative per say. So what I currently have is a single MySQL ...
7
votes
5answers
18k views

Alternative to MySQL Workbench? [closed]

Is there a free alternative to MySQL Workbench? I really need a visual database designer that doesn't crash every five minutes.
7
votes
4answers
570 views

I'm managing SQLite, MySQL and PostgreSQL databases and want a tool for this locally

I develop web applications on Mac OSX in SQLite, MySQL and PostgreSQL and these are then put on the webserver. I want to be able to take the brunt out of looking at the terminal locally when dealing ...
6
votes
3answers
3k views

How to script a database migration using an SSH tunnel?

I am trying to create a sync.sh script that coordinates with our less-than-ideal version control for our website. This script will migrate a live copy of the database to our development environment ...
6
votes
1answer
1k views

Different output when redirecting

$ mysql -e 'select a,b from tablefoo' databasename yields +---+---+ | a | b | +---+---+ | 1 | 0 | | 2 | 1 | +---+---+ whereas $ mysql -e 'select a,b from tablefoo' databasename > file ...
6
votes
9answers
22k views

How do I split a large MySql backup file into multiple files?

I have a 250 MB backup SQL file but the limit on the new hosting is only 100 MB ... Is there a program that let's you split an SQL file into multiple SQL files? It seems like people are answering ...
6
votes
2answers
3k views

Updated my WAMP Server and MySQL is eating up 580mB of memory

I updated my dev-box's WAMPSERVER, and along with updating PHP and Apache, MySQL updated to '5.6.12'. After doing that, I copied the data folder from my old (5.1.36) install to the new one and now ...
6
votes
1answer
2k views

MySQL instance lost when upgrading to Windows 10

I had a running instance of MySQL 5.6 in my Windows 8.1. After upgrading to Windows 10, such instance is gone, including the Windows service for it. Server data files are however intact. What would ...
6
votes
1answer
4k views

MySql Workbench and SSL support

I want to connect to Amazon's RDS MySql service using MySql Workbench 5.2.33 running on Windows. I want to connect using SSL. How do I do this? How can I verify that I am connecting using SSL?