I'm running out of ideas.
This commit is contained in:
parent
82eeaa93ab
commit
b81e048f06
1 changed files with 7 additions and 4 deletions
|
@ -110,12 +110,15 @@ namespace BackupManager {
|
||||||
using (MySqlConnection conn = new MySqlConnection(connStr.ToString())) {
|
using (MySqlConnection conn = new MySqlConnection(connStr.ToString())) {
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
|
||||||
using (MySqlCommand comm = new MySqlCommand(@"SHOW DATABASES;", conn))
|
using(MySqlCommand comm = new(@"SET NAMES 'utf8mb4';"))
|
||||||
using (MySqlDataReader read = comm.ExecuteReader()) {
|
comm.ExecuteNonQuery();
|
||||||
while (read.Read()) {
|
|
||||||
|
using(MySqlCommand comm = new MySqlCommand(@"SHOW DATABASES;", conn))
|
||||||
|
using(MySqlDataReader read = comm.ExecuteReader()) {
|
||||||
|
while(read.Read()) {
|
||||||
string database = read.GetString(0);
|
string database = read.GetString(0);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(database) || exclude.Contains(database))
|
if(string.IsNullOrEmpty(database) || exclude.Contains(database))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
databases.Add(database);
|
databases.Add(database);
|
||||||
|
|
Reference in a new issue