Error 2013: lost connection to mariadb when adding full text index - mysql

I am using Maria DB 10.1.8 latest stable version available and i have dumped around 15 Million records into table more_bar_codes table. When i tried to alter table to add fulltext index onto one of its column, am getting error
2013: lost connection to mysql server during query.
The syntax used is:
Alter table more_bar_codes add fulltext index dl_full_text_bar_code (bar_code);
Any idea how to fix this one?

No timeout worked for me. One workaround is to create temp table like old table and add full text index and then copy data to it. That has resolved my issue.

Related

How to migrate MYSQL 5.7 to 8 without recreate table with dangling FULLTEXT index?

I'm trying to upgrade my RDS MySql from version 5.7 to 8 but I'm getting errors the precheck log that tell me I have issues with the fulltext index.
I tried to delete the fulltext index but I'm still getting this error:
Table xxxx contains dangling FULLTEXT index. Kindly recreate the
table before upgrade.
It's really big table and I can't recreate it so easy.
Can someone have a workaround I can use without the need to recreate this table?
Thanks
This is an error specific to AWS Aurora. It is not a MySQL error (I searched the MySQL source tree and there is no occurrence of the word "kindly").
This AWS documentation page describes the error: https://docs.aws.amazon.com/en_us/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.mysql80-upgrade-procedure.html
Their recommended fix:
First, we go back to the original cluster. Then we run OPTIMIZE TABLE tbl_name [, tbl_name] ... on the tables causing the following error:
Table `tbl_name` contains dangling FULLTEXT index. Kindly recreate the table before upgrade.
They also describe creating a new, empty table, and copying the old data to the new table. This is nearly the same operation, and takes just as long.

ERROR: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY/INPLACE

I have used mysqldump to create a table that is 12GB from MySQL 5.7 to MySQL 8.0.29. I want to add a column using ALTER TABLE documents ADD COLUMN meta_data json NULL, algorithm=instant; in the new table created in 8.0.29. When I run this I keep getting the error ERROR: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY/INPLACE.
When searching Google I can only find information about a bug that should have been fixed in 8.0.14 as can be seen here .
I do not have any fulltext index on my table and trying to add the column to the end of the list.
Anyone know why this is not working?

MYSQL can't add index to table

Currently, I have '246312' records. I am trying to add index to datetime field in my table, using this command:
ALTER TABLE `dateup`.`Message`
ADD INDEX `date_index` (`postedAt` DESC);
I am getting this error:
ERROR 2013: Lost connection to MySQL server during query
SQL Statement:
ALTER TABLE `dateup`.`Message`
ADD INDEX `date_index` (`postedAt` DESC)
ERROR: Error when running failback script. Details follow.
ERROR 2006: MySQL server has gone away
I have tried to set:
SET ##GLOBAL.wait_timeout=1999300;
SET ##GLOBAL.max_allowed_packet=1073741824;
but still I get this error.
i cant rebuild the database using InnoDB,
but dumping the table and import again solved this problem
thank you

mysql crashes when alter table

I am using mysql version 6.1.4 and windows 7
I have an empty table where I want to drop a column and a foreign key. When I try to apply the changes the workbench crashes and when I try to stop Mysql it returns a error
ERROR 2013: Lost connection to MySQL server during query
SQL Statement:
ALTER TABLE `teste_db`.`search_products`
DROP FOREIGN KEY `product_id_id_refs_id_aa2f4dab`
ERROR: Error when running failback script. Details follow.
ERROR 2006: MySQL server has gone away
I have looked around a lot and could not find any clue...
Thanks in advance for any help!
Please follow the steps , If you dont
If it is a MyISAM Table repair it first and check table .
Where as it is a empty table , check if any index present delete that,
Try then , if still not work
Please paste your table structure , Table Engine name.

Adding index failed.. now can't view or edit table

I was adding an index on a column and the server timed out. Now all other tables in the database work fine, but I am unable to access the table I was adding an index on. It does not allow me to delete its contents or the table. It just hangs while running the queries and nothing happens.
Any ideas on a possible solution?
MySQL 5.1
Try the REPAIR TABLE command. Details at http://dev.mysql.com/doc/refman/5.1/en/repair-table.html