MySQL/PostgreSQL DB creation failure during Virtual Server setup

I'm having an issue whereby databases are not being created for new virtual servers on my Debain Squeeze server. Below is the log:

========================================

Creating administration group sorebrain .. .. done Creating administration user sorebrain .. .. done

Creating aliases for administration user .. .. done

Adding administration user to groups .. .. done

Creating home directory .. .. done

Creating mailbox for administration user .. .. done

Adding new DNS zone .. .. done

Adding new virtual website .. .. done

Adding webserver user www-data to server's group .. .. done

Performing other Apache configuration .. .. done

Setting up log file rotation .. .. done

Creating MySQL login .. .. MySQL database failed! : SQL insert into user (host, user, password) values ('localhost', 'sorebrain', password('XFq2T2TWQW2jmaWk')) failed : Field 'ssl_cipher' doesn't have a default value at /usr/share/webmin/web-lib-funcs.pl line 1360.

Creating PostgreSQL login .. .. done

Creating PostgreSQL database sorebrain_com .. .. PostgreSQL database failed! : SQL create database "sorebrain_com" with owner="sorebrain" encoding 'UTF8' failed : new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) at /usr/share/webmin/web-lib-funcs.pl line 1360, line 1.

Creating Webmin user .. .. done

Re-starting DNS server .. .. done

Applying web server configuration .. .. done

Re-loading Webmin .. .. done

Saving server details .. .. done

Installing third-party scripts ..

Installing phpmyadmin version 3.4.10.2 .. .. dependencies problem detected : phpMyAdmin requires a MySQL database

.. done

Status: 
Active

Comments

Which MySQL version are you running there? Is it the MySQL package that comes with Debian 6, or a manually installed version?

It's the package that comes with Debian Squeeze (the latest version of it anyway)

What is the output of this command:

grep sql-mode /etc/mysql/my.cnf

That command didn't return anything. Just for reference, there's the contents of my.cnf:

[client] port = 3306 socket = /var/run/mysqld/mysqld.sock default-character-set = utf8

[mysqld_safe] socket = /var/run/mysqld/mysqld.sock syslog nice = 0

[mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english

key_buffer = 512M max_allowed_packet = 1M thread_cache_size = 8 myisam-recover = BACKUP query_cache_limit = 1M query_cache_size = 4M expire_logs_days = 7 max_binlog_size = 128M innodb_file_per_table = 1 thread_concurrency = 8 myisam_sort_buffer_size = 64M read_rnd_buffer_size = 8M read_buffer_size = 2M sort_buffer_size = 2M table_cache = 4M

character-set-server = utf8 collation-server = utf8_unicode_ci skip-external-locking

sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_S$ default_storage_engine = innodb innodb_data_home_dir = /var/lib/mysql innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /var/lib/mysql innodb_buffer_pool_size = 256M innodb_additional_mem_pool_size = 24M innodb_log_file_size = 64M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 60

EDIT: Sorry about the formatting mess >_>

Hey guys, just a heads-up, I fixed the issue for now: I went into the MySQL User table, and set the ssl_cipher, x509_issuer & x509_subject fields to allow NULL values, and that made everything work

Do those fields in the user table have default values on your system?

No, they had no default values. My guess is it could have been a bug in the debian packages that created the table in the first place?

Could be - on all my test systems, I can add a row to the user table without specifying values for those fields, which causes the default values to be used. This is exactly what Virtualmin does.