|
could you share the my.ini? where is the datadir located?
I assume this does not happen if the service was created with mysql_install_db.exe ?
|
|
mariadb 10.5.4 is located e:\wamp64\bin\mariadb\mariadb10.5.4\ with "normal" bin and data folders.
my.ini is E:\wamp64\bin\mariadb\mariadb10.5.4\my.ini
; The following options will be passed to all MariaDB clients
|
[client]
|
port = 3306
|
socket = /tmp/mariadb.sock
|
|
; Here follows entries for some specific programs
|
; The MariaDB server
|
[wampmariadb64]
|
;skip-grant-tables
|
port = 3306
|
socket = /tmp/mariadb.sock
|
skip-external-locking
|
key_buffer_size = 256M
|
max_allowed_packet = 1M
|
table_open_cache = 256
|
sort_buffer_size = 2M
|
net_buffer_length = 8K
|
read_buffer_size = 1M
|
read_rnd_buffer_size = 4M
|
myisam_sort_buffer_size = 64M
|
basedir="E:/wamp64/bin/mariadb/mariadb10.5.4"
|
log-error="E:/wamp64/logs/mariadb.log"
|
datadir="E:/wamp64/bin/mariadb/mariadb10.5.4/data"
|
|
;Path to the language
|
;See Documentation:
|
; https://mariadb.com/kb/en/mariadb/server-system-variables/#lc_messages
|
lc-messages-dir="E:/wamp64/bin/mariadb/mariadb10.5.4/share"
|
lc-messages=fr_FR
|
|
; Set the SQL mode
|
;sql-mode=""
|
;sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
|
|
; The default storage engine that will be used when create new tables
|
default-storage-engine=MYISAM
|
|
;To avoid warning messages
|
secure_file_priv="E:/wamp64/tmp"
|
skip-ssl
|
|
; Point the following paths to different dedicated disks
|
tmpdir="E:/wamp64/tmp"
|
|
; Replication Master Server (default)
|
; binary logging is required for replication
|
;log-bin=mysql-bin
|
|
; binary logging format - mixed recommended
|
;binlog_format=mixed
|
|
; required unique id between 1 and 2^32 - 1
|
; defaults to 1 if master-host is not set
|
; but will not function as a master if omitted
|
server-id = 1
|
|
innodb_data_file_path = ibdata1:12M:autoextend
|
; You can set .._buffer_pool_size up to 50 - 80 %
|
; of RAM but beware of setting memory usage too high
|
innodb_buffer_pool_size = 256M
|
;innodb_additional_mem_pool_size = 2M
|
innodb_log_file_size = 64M
|
innodb_log_buffer_size = 32M
|
innodb_flush_log_at_trx_commit = 1
|
innodb_lock_wait_timeout = 50
|
innodb_flush_method=normal
|
|
[mysqldump]
|
quick
|
max_allowed_packet = 16M
|
|
[mysql]
|
no-auto-rehash
|
|
[myisamchk]
|
key_buffer_size = 20M
|
sort_buffer_size = 20M
|
read_buffer = 2M
|
write_buffer = 2M
|
|
[mysqlhotcopy]
|
interactive-timeout
|
|
[mysqld]
|
port = 3306
|
mysql_install_db.exe is only used to create datadir when installing the related version of MariaDB.
Since the first use of MariaDB (5.5.54) the service has always been created by mysqld.exe --install-manual and now by the Windows sc command.
|
|
> I assume this does not happen if the service was created with mysql_install_db.exe ?
Since mysql_install_db.exe exists, i.e. since the data folder is no longer part of the mariadb distribution, I don't use it to create the service for several reasons:
- 1 - inability to specify --defaults-file
- 2 - defaults-file specified in the service is always E:\wamp64\bin\mariadb\mariadbx.y.z\data\my.ini
- 3 - since the beginning of time, my file has always been E:\wamp64\bin\mariadb\mariadbx.y.z\my.ini.
- 4 - the my.ini file is always recreated, the existing one is not taken into account
- 5 - automatic service start
- 6 - Impossibility to specify a manual start of the service
Indeed, if the service was created by mysql_install_db.exe, there is no FATAL ERROR.
Looking at mysql_upgrade_service.wampmariadb64.log, it would seem that mariadb-upgrade-service.exe does not do much more than mysql_upgrade.exe which does not cause any problem and which I have been using for a long time.
|
|
Thanks. Since you confirmed, I removed "no matter how the service was created" from description.
|
|
Thank you for your feedback.
To your others points, I guess 1-3 is the same (though, since the beginning of time in MariaDB, the my.ini was in data folder) 5-6 are also the same. 4 is trivially fixed, it does not preclude you from copy/override the newly created one with your own.
Let me give an explanation on why we do things the way we do, and tell you about some things you might not be aware of.
- my.ini inside a datadir, is a conscious decision made in 2011-12, if you always put my.ini into the installation root, you can have 1 service per installation. if you put it into a datadir , you can have as many as you like
- The most important thing, why mysqld --install should never be used to install MariaDB, or MySQL is that it runs with the most powerful account on Windows, LocalSystem , which it does not need, and this is a serious security vulnerability . Nobody runs mysqld as OS "root" account on Unixen, and you should not do that on Windows, either. The OS account MariaDB is using (NetworkService prior to 10.6, and "NT SERVICE\<service_name>" after 10.6) are the least powerful "service" accounts (i.e the ones that need no password to run). They can't write outside of data directory. They can write inside the data directory, because mysql_install_db.exe explicitly allows that by explicitly setting directory permissions on data directory. If you insist on creating service on your own, .eg with "sc", I highly recommend doing the same thing, setting permissions for the least powerful service account , and using "obj" with "sc create"
The mysql_upgrade_service does do a little more than you might have noticed. It does an Innodb "slow shutdown", and if you do not run a slow shutdown, prior to upgrade, you might not be able to start your service in the new path, due to the changed redo log format.
- 5. and 6. manual is trivially fixed with "sc config [service name] start=manual"
default-storage-engine=MYISAM, is that the WAMP default?
|
|
Instead of removing "no matter how the service was created" which will make the description ambiguous, I think it would be better to be positive and specify, for example "mariadb-upgrade-service.exe only supports services created by mysql_install_db.exe" or something like that.
|
|
Unfortunately, it claims to support the services created with obsolete mysqld --install. I think I fixed the description so that there is no ambiguity.
|
|
> default-storage-engine=MYISAM, is that the WAMP default?
It's been like this for more than sixteen years with MySQL before Wampserver also supports MariaDB.
This doesn't prevent you from creating tables using another engine.
Wampserver is primarily intended for beginners who want to learn about databases.
This has never created any problem for "those who know".
|
|
it is just my opinion, but have a surprising effect for those beginners who learn about databases, to find out that ROLLBACK statement, as in SQL standard, does not work, and they should be using a non-standard extension ENGINE= , to make it work.
On one hand, backward compatibility is commendable, yet given that Innodb has been default engine in MySQL for half of Wampserver existence, or longer, perhaps it could be a time to reconsider.
|
|
I fixed it in 10.1, and it will be merged up to 10.6, at some point.
The problem with that my.ini file is that it uses service name instead of expected [mysqld], so the datadir was not determined, thus FATAL ERROR without much context.
|