x64architecture / wnmp

An easy Nginx, MariaDB and PHP environment for Windows.
https://wnmp.x64architecture.com
GNU General Public License v3.0
508 stars 110 forks source link

MySQL control buttons #129

Open mittus opened 2 years ago

mittus commented 2 years ago

I write password for root user mysql in the config file "my.ini", but I can't start MariaDB Shell without password from WNMP interface. image

If I start mysql from any bash, it work's for me. image

And I whant remove button "Setup MariaDB", can you make visability for this button optional with application settings?

longware commented 11 months ago

` private void SetupMariaDB_Shown(object sender, EventArgs e) { if (Directory.Exists(dataDirectory)) { DialogResult result = MessageBox.Show( Language.Resource.MARIADB_DATA_DIR_EXISTS.Replace("{dataDirectory}", dataDirectory), Language.Resource.MARIADB_SETUP, MessageBoxButtons.YesNo, MessageBoxIcon.Warning ); if (result == DialogResult.No) { Close(); return; } else { try { Directory.Delete(dataDirectory, true); } catch (Exception ex) { Log.Error(ex.Message); } }

        }
    }

` I report a "Setup MariaDB" problem:

Directory.Delete(dataDirectory, true);

This line of code is very dangerous. it will easily delete all the data in 'data' dir. It is recommended to change it to rename dataDirectory.