Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igrmk/ubuntu-reinit-mysql
Script to reinit MySQL data directory in Ubuntu
https://github.com/igrmk/ubuntu-reinit-mysql
mysql ubuntu
Last synced: 2 months ago
JSON representation
Script to reinit MySQL data directory in Ubuntu
- Host: GitHub
- URL: https://github.com/igrmk/ubuntu-reinit-mysql
- Owner: igrmk
- License: mit
- Created: 2019-11-21T20:24:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-26T18:12:16.000Z (about 4 years ago)
- Last Synced: 2023-03-05T06:34:30.276Z (almost 2 years ago)
- Topics: mysql, ubuntu
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 20
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ubuntu-reinit-mysql
===================WARNING! THIS SCRIPT WILL REMOVE ALL YOUR MYSQL DATA!
If you need to apply some settings like `lower_case_table_names` then you probably need to reinit your data directory.
However it is not that easy in Ubuntu because post-installation script performs some additional steps.
You will lose them if you reinit data directory by yourself.
This script reinits data directory and performs same steps:* Creates a special maintenance user used by an OS on upgrading
* Sets up UNIX socket authentication so that you can write `sudo mysql` and connect to database as rootUsage
-----Just download it and run with superuser privileges:
sudo ./ubuntu-reinit-mysql
Origin
------You may want to look at original post-installation script:
apt download mysql-server-8.0
dpkg-deb -R mysql-server-8.0*.deb .
vi DEBIAN/postinst