MySQL Deployment Crashed

mazter707
PRO

a year ago

I have added a record to one of my database tables and when the automatic deployment was done, it crashed. When reviewing the logs I found this:

2024-06-14T22:51:11.725181Z 0 [System] [MY-015015] [Server] MySQL Server - start.

2024-06-14T22:51:12.035469Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 7

2024-06-14T22:51:12.046108Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-06-14T22:51:12.407154Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2024-06-14T22:51:12.946170Z 4 [System] [MY-013381] [Server] Server upgrade from '80200' to '80400' started.

2024-06-14T22:52:09.528989Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Deprecate spatial reference systems -- Deprecation must happen before new SRSs are added/updated since there -- typically are new SRSs with the same names. REPLACE INTO mysql.stspatialreferencesystems(id, catalogid, name, organization, organizationcoordsysid, definition, description) VALUES (3907, 1, 'MGI 1901 / Balkans zone 5 (3907 deprecated)', 'EPSG', 3907, 'PROJCS["MGI 1901 / Balkans zone 5",GEOGCS["MGI 1901",DATUM["MGI 1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943278,AUTHORITY["EPSG","9122"]],AXIS["Lat",NORTH],AXIS["Lon",EAST],AUTHORITY["EPSG","3906"]],PROJECTION["Transverse Mercator",AUTHORITY["EPSG","9807"]],PARAMETER["Latitude of natural origin",0,AUTHORITY["EPSG","8801"]],PARAMETER["Longitude of natural origin",15,AUTHORITY["EPSG","8802"]],PARAMETER["Scale factor at natural origin",0.9999,AUTHORITY["EPSG","8805"]],PARAMETER["False easting",5500000,AUTHORITY["EPSG","8806"]],PARAMETER["False northing",0,AUTHORITY["EPSG","8807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",NORTH],AXIS["Y",EAST],AUTHORITY["EPSG","3907"]]', 'Deprecated since EPSG Dataset 9.5. Superseded by SRID 8677.'); ' failed with error code = 1205, error message = 'Lock wait timeout exceeded; try restarting transaction'.

2024-06-14T22:52:09.534046Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.

2024-06-14T22:52:09.534098Z 0 [ERROR] [MY-010119] [Server] Aborting

2024-06-14T22:52:09.851150Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL.

2024-06-14T22:52:09.851188Z 0 [System] [MY-015016] [Server] MySQL Server - end.

Project name: victorious-profit
Project ID: 994a7037-9fdc-49ed-af1f-bee52619df61

Because of this my website throws an error code 500

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

27 Replies

mazter707
PRO

a year ago

Hello, I'm still waiting for help. Greetings.


a year ago

Have you tried redeploying the database?


mazter707
PRO

a year ago

Yes and it crashed again


a year ago

Do you have a backup?


mazter707
PRO

a year ago

No


a year ago

Try pinning your source image to mysql:8.2.0


mazter707
PRO

a year ago

How do I do it?


a year ago

Remove the current image and replace it with that.


mazter707
PRO

a year ago

Will I lose all the records in my table if I do that?


mazter707
PRO

a year ago

What can I do to recover the information from this database?


a year ago

Unless you have severely misconfigured something else you will not lose data.


mazter707
PRO

a year ago

Do you have a guide to help me carry out this process? I don't want to make a mistake and delete the records.


a year ago

Simply swap the image source.


mazter707
PRO

a year ago

The image is created automatically when I create a new database


a year ago

Go into the service settings of the broken database and swap the source image.


mazter707
PRO

a year ago

I'm lost, I don't know how to do it :(


a year ago

Well now it doesn't have an image at all, so go ahead and connect the image I sent in a past message.


mazter707
PRO

a year ago

I think the link to the image you sent was deleted or it was not attached


a year ago

Just tested it and it worked fine. Simply copy and paste it.


mazter707
PRO

a year ago

It didn't work

Attachments


a year ago

Looks like you ended up in a bad state where MySQL can't upgrade fully to 8.4 but also can downgrade to 8.2.

I don't know what to do here.


mazter707
PRO

a year ago

What if I try 8.3?


a year ago

Go ahead and try.


mazter707
PRO

a year ago

That didn't work either


mazter707
PRO

a year ago

Is there a way to connect via console or other way to my database?


a year ago

Since the database has shut down there's no way to access it. In the future I would recommend keeping backups.


mazter707
PRO

a year ago

Any guide to be able to make backups of MySQL databases?


MySQL Deployment Crashed - Railway Help Station