Questions tagged [heidisql]

HeidiSQL is a lightweight, Windows based application for managing MySQL, MariaDB, MS SQL, PostgreSQL and SQLite databases.

Overview

HeidiSQL is a useful and reliable tool designed for web developers using the popular MariaDB and MySQL server, Microsoft SQL databases, PostgreSQL and SQLite. It enables you to browse and edit data, create and edit tables, views, procedures, triggers and scheduled events. Also, you can export structure and data either to SQL file, clipboard or to other servers.

ScreenShot

enter image description here

Links

Official website
HeidiSQL on Github

408 questions
285
votes
35 answers

mysql Foreign key constraint is incorrectly formed error

I have two tables, table1 is the parent table with a column ID and table2 with a column IDFromTable1 (not the actual name) when I put a FK on IDFromTable1 to ID in table1 I get the error Foreign key constraint is incorrectly formed error. I would…
user516883
  • 8,868
  • 23
  • 72
  • 114
23
votes
4 answers

How to copy a database using HeidiSQL?

I have a local installation of MariaDB on a Windows XP. I created an empty database db_y which I wanted to populate with the tables of the database db_x which I exported as a dump-file from a MySQL-instance (with HeidiSQL). When I imported the…
giordano
  • 2,954
  • 7
  • 35
  • 57
11
votes
3 answers

When do I use libmysql-6.1.dll vs libmysql.dll?

I'm using HeidiSQL to edit a MYSQL database, and it's asking which library I want to use for the edits: libmysql-6.1.dll libmysql.dll How do I know which one to use?
user2258740
  • 199
  • 2
  • 11
10
votes
2 answers

Create table fails with Foreign Key Constraint is incorrectly Formed

create table users (id int not null auto_increment , username varchar(255) NOT NULL , password varchar(255) NOT NULL , active int NOT NULL , PRIMARY KEY (id)) ENGINE=InnoDB COLLATE=utf8_unicode_ci; create table athing (id int not null…
John
  • 101
  • 1
  • 1
  • 4
8
votes
2 answers

HeidiSQL won't list my database

My postgres yaml part looking like this: postgres: container_name: 'postgres' image: postgres:10.1 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=root - POSTGRES_DB=myids ports: - "5432:5432" …
Sergino
  • 10,128
  • 30
  • 98
  • 159
7
votes
3 answers

Unable to connect to LocalDB with HeidiSQL

I have been trying to connect to a localdb instance with the latest version (at this time) of heidisql to no avail. I have followed the instructions from this answer here but it doesn't seem to work (anymore): HeidiSql connection to MS SQL Server…
Marios T.
  • 85
  • 2
  • 7
7
votes
4 answers

mariadb declare variable syntax error

Im using mariadb with heidisql to execute sql: DECLARE @AccountID INT; Insert Into accounts(first_name, mi, last_name, email, is_admin, is_enabled, date_created) Values('testfirstname', 'a', 'testlastname', 'user@email.com', 1, 1, NOW()); set…
adviner
  • 3,295
  • 10
  • 35
  • 64
7
votes
2 answers

HeidiSQL import csv empty fields

I want to import a csv file to my MySQL database with HeidiSQL. But some of my fields are empty. What could I do to let HeidiSQL know these empty values have to be seen as NULL-values? Sample of csv-file (last 2 fields not yet known): …
francisMi
  • 925
  • 3
  • 15
  • 31
6
votes
4 answers

Database Import error after exporting

Just like title say. I am using HeidiSQL, and i wan't to duplicate a database so i export the database, create a new empty with name "test". Then i change the name of the database to "test" in the .sql file and try to import the database, then i…
aluknot
  • 504
  • 2
  • 7
  • 20
6
votes
5 answers

Compound primary key in HeidiSQL

I have a table which contains many fields. I'd like to set "id" and "userId" as a composite primary key in HeidiSQL, do you know if it is possible with this software?
mark
  • 939
  • 2
  • 13
  • 36
6
votes
5 answers

sql if exists update else insert not working

i have a table with 3 generic keys which are also foreign keys. This is my query -- IF (EXISTS(SELECT * FROM table1 WHERE col_1 =4)) BEGIN UPDATE table1 SET col_2 = 3, col_3 = 100 WHERE col_1 = 4 …
user983983
  • 158
  • 1
  • 2
  • 11
6
votes
3 answers

Trying to add foreign key in mysql with heidisql

I've been trying to add a foreign key to my table using heidisql and I keep getting the error 1452. After reading around I made sure all my tables were running on InnoDB as well as checking that they had the same datatype and the only way I can add…
randomdice101
  • 71
  • 1
  • 1
  • 3
5
votes
1 answer

Postgres syntax error on UNIQUE INDEX - HeidiSQL

HeidiSQL generated the following creation code: CREATE TABLE "books" ( "id" BIGINT NOT NULL, "creation_date" TIMESTAMP NOT NULL, "symbol" VARCHAR NOT NULL, PRIMARY KEY ("id"), UNIQUE INDEX "symbol" ("symbol") ) ; COMMENT ON…
Ben Beri
  • 1,101
  • 4
  • 23
  • 64
5
votes
3 answers

SQL: How do I group by a unique combination of two columns?

Context: A table message has the columns from_user_id and to_user_id The user should see the recent conversations with the last message displayed A conversation consists of multiple messages, that have the same combination of user IDs (user sends…
StoryTeller
  • 1,673
  • 12
  • 30
5
votes
3 answers

HeidiSQL can't connect to my RDS database?

Hoping someone can help me with this issue I am running into. HeidiSQL won't connect to my RDS database. I can connect to it when I'm on my EC2 instance but not using Heidi SQL. The error I keep getting is: Can't connect to MySQL server on…
Bushinos
  • 53
  • 1
  • 1
  • 3
1
2 3
27 28