Comments (2)
Wow thanks mate, appreciate that.
I'm copy pasting your code snippet below for reference:
systemctl enable mariadb
systemctl start mariadb
#mysql_secure_ins-whatever is a garbage script
#run the same commands it does, but without an expect wrapper
#this is a cloud cattle car, not a multiuser system
export PASS=MYVAL
mysql -uroot -e "UPDATE mysql.user SET Password=PASSWORD('$PASS') WHERE User='root';"
mysql -uroot -p$PASS -e "FLUSH PRIVILEGES;"
mysql -uroot -p$PASS -e "DELETE FROM mysql.user WHERE User='';"
mysql -uroot -p$PASS -e "DROP DATABASE IF EXISTS test;"
mysql -uroot -p$PASS -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
mysql -uroot -p$PASS -e "FLUSH PRIVILEGES;"
#this disabled everything but remove root login, which in a private VPC you might want on
#but here's the part that does it, ripped out of that script
#mysql -uroot -p$PASS -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
#mysql -uroot -p$PASS -e "FLUSH PRIVILEGES;"
Yah I hate the expect approach too, but didn't know of a better method... MySQL in general seems to present various challenges in Bash scripting.
Will review this, thanks :)
from slickstack.
We are no longer using expect
or janky guess-and-check for MySQL installation, which is now in it's own script. Although it's still being perfected, interested users can review the script here:
https://github.com/littlebizzy/slickstack/blob/master/ss-install-mysql.txt
It is now included as part of the ss-install
process.
The focus is now on supporting MySQL 8.0.x and accompanying challenges like password validation, auth_socket
etc.
from slickstack.
Related Issues (20)
- Migration slickstack between VPS to VPS HOT 1
- change php version and Install ioncube loader HOT 4
- Install freeze on Running ss-install-redis-packages... HOT 3
- Website very slow loading inside apps ios HOT 3
- CERT_AUTHORITY_INVALID After install HOT 1
- SUDO_USER and SFTP_USER validation check to avoid conflicts? HOT 2
- Perform custom tasks during certain SlickStack scripts HOT 1
- Invalid user mysql:mysql error when using remote database HOT 1
- Ensure more privacy for openssl cert generation. HOT 11
- SS_ADMINER_PUBLIC="false" does not work as intended. HOT 9
- Allow tuning of PHP8 JIT settings (opcache.jit options in php.ini) HOT 4
- Cloudflare real visitor IP support in Nginx config HOT 18
- Option to allow only Cloudflare IPs to connect to origin server HOT 2
- OpenVZ PHP-FPM "Unable to set priority for the master process: Permission denied" HOT 8
- Support for custom Permissions Policy HTTP header in Nginx HOT 6
- Improve WP-Cron robustness for Multisite environments HOT 3
- Scanning WordPress core files to check if intact or broken HOT 4
- Redirect .php extension to WordPress if not exists HOT 4
- Why deny /wp-admin/load-styles.php and /wp-admin/load-scripts.php? HOT 3
- Nginx access log enabled by default but nginx.conf says not HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slickstack.