Want more timely Centmin Mod News Updates?
Become a Member

centmin.sh Add auto generate database and mysql user during option 2

Discussion in 'Feature Requests & Suggestions' started by pdinh97qng, Sep 15, 2019.

  1. pdinh97qng

    pdinh97qng Member

    102
    12
    18
    Jan 24, 2016
    Ratings:
    +33
    Local Time:
    7:37 PM
    I know that centmin mod have a tool to create database and mysql user but it will be much easier if we have an option whether to generate them after creating a vhost domain (option 2).
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    3,915
    391
    83
    May 31, 2014
    Ratings:
    +760
    Local Time:
    5:37 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    With a question if we need to create that, YES i agree as most of the times is needed!
     
  3. eva2000

    eva2000 Administrator Staff Member

    46,244
    10,512
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,295
    Local Time:
    1:37 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    I'd have to think about that as you already have quick ways of doing just that see Install - Quick Centmin Mod Install + Nginx Vhost Site + MySQL Database Setup

    one time task ensure letsencrypt support is enabled
    Code (Text):
    touch /etc/centminmod/custom_config.inc
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    

    then you can create letsencrypt HTTPS SSL default site called domain.com with desired pure-ftpd username = ftpusername and create mysql database named = mydb with mysql user = myadmin and mysql user password = mypass
    Code (Text):
    nv -d domain.com -s lelived -u ftpusername
    /usr/local/src/centminmod/addons/mysqladmin_shell.sh createuserdb mydb myadmin mypass
    

    centmin.sh menu option 2 or nv command line can create nginx vhost sites easily as outlined at Nginx Vhost & NSD DNS Setup - CentminMod.com LEMP Nginx web stack for CentOS