Você está na página 1de 3

Basic help on using HeidiSQL

This document aims to give users some basic help to get started with HeidiSQL. Over
the years, the feature list has grown longer and longer. So, especially new users
sometimes don't know where to look at for particular things. In such cases, you can
watch out here for a first help. If you don't find what you're looking for, please register
in the forum and post a question.
Adblocker activated? No problem. But please notice that HeidiSQL balances its
expenses with ads. This way, HeidiSQL stays free for everyone on the world, including
the low tech areas of the third world. Probably you want to donate.

Requirements
HeidiSQL runs fine on Windows XP, Vista and 7. Running HeidiSQL on Wine/Linux
also works fine.
On Windows 2000 you might run into some "illegal function call into KERNEL.DLL",
which is caused by the newer libmysql.dll which dropped Win2k support. You can fix
that by placing this older one into the HeidiSQL directory, overwriting the original.
HeidiSQL does not run on Windows 95/98 or ME, as the Unicode extensions are not
available on these systems.

Connecting to a server
Basics
HeidiSQL is a so called client application, only usable when you have some server
available. So, make sure you have some MySQL, MS SQL or PostgreSQL server to
connect to.

A simple setup is to have a MySQL server installed on localhost (equivalent to the


special IP address 127.0.0.1). In HeidiSQL's session manager, you click on the "New"
button to create a new connection, and most default settings are already set for you,
except from the password, which is mostly not an empty one on a newly installed
MySQL server:
You can organize your stored sessions in folders. To create a folder, click the dropdown
arrow on the "New" button, then click "Folder in root folder" or "Folder in selected
folder". Once you have a folder, you can create connections in it, or drag existing
connections into that folder.

Setting up a SSH tunnel connection to MySQL


If your MySQL server is located on a remote machine which is only accessible via SSH,
then you still can use HeidiSQL to connect to it. You just need the additional plink.exe
from the PuTTY project, place it somewhere on your harddisk, and finally tell
HeidiSQL where it is and the SSH credentials plus the MySQL credentials.
Note that the default host name for the SSH server is the one you entered in the
"Settings" tab. HeidiSQL then advices plink.exe to connect to that host name, or, when
you entered a SSH host name, that one is taken. Additionally, the host name on the
"Settings" tab is always taken for the -L (listen) option in plink.exe.

Example settings:

"Settings" tab:
o Hostname: "127.0.0.1"
o Password: [your mysql password]
o Port: "3306" in most cases
"SSH tunnel tab:
o SSH Host: [your server name]
o Port: "22" in most cases
o Username: [your ssh user]
o Password: [your ssh password]
o Local port: "3307"

The following error, or a similar one, is mostly caused by a tunnel onto the official IP
address of your remote server:
Lost connection to MySQL server at 'reading initial communication packet', system
error: 0 "Internal error/check (Not system error)"
In such cases, ensure you're using "127.0.0.1" in Settings > Hostname/IP, and the
remote IP of your server in SSH tunnel > Host.

Você também pode gostar