Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch update centmin.sh menu option 6 additional submenu options in 130.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jul 2, 2024.

  1. eva2000

    eva2000 Administrator Staff Member

    53,278
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    5:11 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update centmin.sh menu option 6 additional submenu options in 130.00beta01

    - add centmin.sh menu option 6 submenu options for MySQL database deletion and listing

    ----------------------------------------------------------------
    MySQL User Database Management Sub Menu
    ----------------------------------------------------------------
    Command Line Version community.centminmod.com/threads/543/
    ----------------------------------------------------------------
    1). Create MySQL User and Database
    2). Add Database to Existing MySQL User
    3). Add Existing Database to Existing MySQL User
    4). Add Existing Database to New MySQL User
    5). Change MySQL User Password
    6). Delete MySQL User
    7). Show Grants for MySQL User
    8). Create Global MySQL User (access to all databases)
    9). Create Multiple MySQL Databases and Users from File
    10). Delete MySQL Database
    11). List All MySQL Databases and Users
    12). Return to Main Menu
    ----------------------------------------------------------------
    Enter option [ 1 - 12 ]: 11
    Do you want to proceed with this option? [y/n]: y
    --------------------------------------------------------------
    MySQL Admin
    --------------------------------------------------------------
    --------------------------------------------------------------

    --------------------------------------------------------------
    List MySQL Databases, Creation Dates, and Associated Users
    --------------------------------------------------------------
    db: db1 created: 2024-06-28 15:27:48 [users: user1]
    db: db2 created: 2024-06-28 15:32:26 [users: user2]
    db: db3 created: 2024-06-28 15:35:55 [users: user2, user3]
    db: db4 created: 2024-06-28 15:36:36 [users: user4]
    db: db5 created: 2024-06-28 15:39:04 [users: user5]
    db: db6 created: 2024-06-28 15:40:06 [users: user6]
    db: db7 created: 2024-06-28 15:45:30 [users: user7]
    db: db8 created: 2024-06-28 15:47:05 [users: user8]
    db: db9 created: 2024-06-28 15:48:47 [users: user9]
    db: db10 created: 2024-06-28 15:58:05 [users: user10]
    db: db11 created: 2024-06-28 16:03:32 [users: user11]
    db: db12 created: 2024-06-28 16:04:35 [users: user12]
    db: db13 created: 2024-06-28 16:06:17 [users: user13]
    db: db14 created: 2024-06-28 16:09:01 [users: user14]
    db: newdb1 created: 2024-06-28 16:09:37 [users: user1]
    db: test created: 2024-06-25 11:16:59 [users: none]

    and deletion

    ----------------------------------------------------------------
    MySQL User Database Management Sub Menu
    ----------------------------------------------------------------
    Command Line Version community.centminmod.com/threads/543/
    ----------------------------------------------------------------
    1). Create MySQL User and Database
    2). Add Database to Existing MySQL User
    3). Add Existing Database to Existing MySQL User
    4). Add Existing Database to New MySQL User
    5). Change MySQL User Password
    6). Delete MySQL User
    7). Show Grants for MySQL User
    8). Create Global MySQL User (access to all databases)
    9). Create Multiple MySQL Databases and Users from File
    10). Delete MySQL Database
    11). List All MySQL Databases and Users
    12). Return to Main Menu
    ----------------------------------------------------------------
    Enter option [ 1 - 12 ]: 10
    Do you want to proceed with this option? [y/n]: y
    --------------------------------------------------------------
    MySQL Admin
    --------------------------------------------------------------
    --------------------------------------------------------------

    --------------------------------------------------------------
    Delete MySQL Database
    --------------------------------------------------------------
    WARNING: Ensure you have a MySQL database backup before deletion!


    Enter the name of the database you want to delete: test
    Are you absolutely sure you want to delete the database 'test'?
    Type the database name again to confirm deletion: test

    Ok: Database 'test' was successfully deleted

    Continue reading...

    140.00beta01 branch
     
  2. Itworx4me

    Itworx4me Active Member

    299
    27
    28
    Mar 14, 2017
    Ratings:
    +48
    Local Time:
    12:11 AM
    Nginx 1.25.X
    MariaDB 10.6.X
    Suggestion: Add the ability to backup a database to a file folder

    ----------------------------------------------------------------
    MySQL User Database Management Sub Menu
    ----------------------------------------------------------------
    Command Line Version community.centminmod.com/threads/543/
    ----------------------------------------------------------------
    1). Create MySQL User and Database
    2). Add Database to Existing MySQL User
    3). Add Existing Database to Existing MySQL User
    4). Add Existing Database to New MySQL User
    5). Change MySQL User Password
    6). Delete MySQL User
    7). Show Grants for MySQL User
    8). Create Global MySQL User (access to all databases)
    9). Create Multiple MySQL Databases and Users from File
    10). Delete MySQL Database
    11). List All MySQL Databases and Users
    12). Backup MySQL Database
    13). Return to Main Menu
    ----------------------------------------------------------------
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,278
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    5:11 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    centmin.sh menu option 21 has that covered and more centminmod/datamanagement/centmin.sh-menu-21.readme.md at 140.00beta01 · centminmod/centminmod

    Code (Text):
    --------------------------------------------------------
         Centmin Mod Data Management       
    --------------------------------------------------------
    1). Manage SSH Keys
    2). Manage AWS CLI S3 Profile Credentials
    3). Migrate Centmin Mod Data To New Centmin Mod Server
    4). Backup Nginx Vhosts Data + MariaBackup MySQL Backups
    5). Backup Nginx Vhosts Data Only (no MariaDB MySQL backups)
    6). Backup MariaDB MySQL With MariaBackup Only (no Vhosts Data backups)
    7). Backup MariaDB MySQL With mysqldump only (no Vhosts Data backups)
    8). Transfer Directory Data To Remote Server Via SSH
    9). Transfer Directory Data To S3 Compatible Storage
    10). Transfer Files To S3 Compatible Storage
    11). Download S3 Compatible Stored Data To Server
    12). S3 To S3 Compatible Storage Transfers
    13). List S3 Storage Buckets
    14). Back to Main menu
    --------------------------------------------------------
    Enter option [ 1 - 14 ]
    --------------------------------------------------------


    But back's up all databases. So guess you need single database backup but not always useful as web apps have data or file references to databases. So separating data files I.e. attachments from MySQL data backups won't give you a full backup to restore from as there maybe discrepancies between the file and MySQL references. Hence, why centmin.sh menu option 21 backs up all data at same time to ensure restoration keeps data integrity and correct references
     
  4. Itworx4me

    Itworx4me Active Member

    299
    27
    28
    Mar 14, 2017
    Ratings:
    +48
    Local Time:
    12:11 AM
    Nginx 1.25.X
    MariaDB 10.6.X
    Never thought to click on option #21 as you have it listed (TBA). I ran both option 6 and 7 on my testing server. I see that you are using the date to save the file. Very confusing for US people as you use 040824 as the date today. Could there be an option to set the date to 080424???

    Thanks,
    Itworx4me