Learn about Centmin Mod LEMP Stack today
Register Now

How to create a database?option 2 vhost , guide me if possible

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Venucci, Jul 17, 2020.

  1. Venucci

    Venucci Member

    74
    8
    8
    Sep 25, 2018
    Ratings:
    +8
    Local Time:
    12:01 PM
    currentyl
    10
    I wish to create a database for new domain.
    I must use option 2 and run it with lets encrypt. At this moment everything is explained. creating FTP etc.(Nginx Vhost & NSD DNS Setup - CentminMod.com LEMP Nginx web stack for CentOS) but i wish to add a database. I have seen that in root/tools i must install something shell or something like that in order to create a database. Would you mind to give me step by step how to do it, please ?
    I mean installation of the tool , how to activate the tool , how to use the tool etc. I have seen some guides but unfortunately i am lost so i would need if possible a step by step guide. I think that this could be useful for another people as well . Thank you ! Kind regards!

    mysqladmin_shell.sh Shell based Addon
     
    Last edited: Jul 17, 2020
  2. eva2000

    eva2000 Administrator Staff Member

    45,183
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,926
    Local Time:
    8:01 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    you can see examples of addons/mysqladmin_shell.sh usage at
    above is example for command
    Code (Text):
    /usr/local/src/centminmod/addons/mysqladmin_shell.sh createuserdb mydb myadmin mypass
    
     
  3. Venucci

    Venucci Member

    74
    8
    8
    Sep 25, 2018
    Ratings:
    +8
    Local Time:
    12:01 PM
    currentyl
    10
  4. eva2000

    eva2000 Administrator Staff Member

    45,183
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,926
    Local Time:
    8:01 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    123.09beta01 already has addons/mysqladmin_shell.sh
     
  5. Venucci

    Venucci Member

    74
    8
    8
    Sep 25, 2018
    Ratings:
    +8
    Local Time:
    12:01 PM
    currentyl
    10
    Created the database and another question if i am running in the same vps the database and the php script i must add into the installation the localhost(the ip) and port 3306 . Must i open the port 3306 from the firewall ? I mean they run both over the same VPS so i am not pretty sure if i must open it or not . Thanks ! Kind regards!
     
    Last edited: Aug 6, 2020
  6. eva2000

    eva2000 Administrator Staff Member

    45,183
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,926
    Local Time:
    8:01 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    no need to open port 3306 if mysql is running on same server as PHP that is connecting to it