configuring mariadb on windows

Asked by Yehuda Katz

I have strawberryperl installed on my computer and i tried to run "C:\Webserv\MariaDB\scripts>perl mysql_install_db.pl --basedir=C:\Webserv\MariaDB" (--force because the hostname command does not exist on windows)
This is the output I got:

100825 0:43:21 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
100825 0:43:21 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
C:\Webserv\MariaDB/bin/mysqld.exe: Can't change dir to 'C:\Program Files\MySql\MySQL Server 5.1\data\' (Errcode: 2)
100825 0:43:21 [ERROR] Aborting

100825 0:43:21 [Note] C:\Webserv\MariaDB/bin/mysqld.exe: Shutdown complete

100825 0:43:21 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
100825 0:43:21 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
C:\Webserv\MariaDB/bin/mysqld.exe: Can't change dir to 'C:\Program Files\MySql\MySQL Server 5.1\data\' (Errcode: 2)
100825 0:43:21 [ERROR] Aborting

100825 0:43:21 [Note] C:\Webserv\MariaDB/bin/mysqld.exe: Shutdown complete

C:\Webserv\MariaDB\scripts>perl mysql_install_db.pl --basedir=C:\Webserv\MariaDB --force
Installing MySQL system tables...100825 0:44:43 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
100825 0:44:43 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
C:\Webserv\MariaDB/bin/mysqld.exe: Can't change dir to 'C:\Program Files\MySql\MySQL Server 5.1\data\' (Errcode: 2)
100825 0:44:43 [ERROR] Aborting

100825 0:44:43 [Note] C:\Webserv\MariaDB/bin/mysqld.exe: Shutdown complete

OK

Filling help tables...100825 0:44:43 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
100825 0:44:43 [Warning] Can't create test file C:\Program Files\MySql\MySQL Server 5.1\data\Yehuda-W7.lower-test
C:\Webserv\MariaDB/bin/mysqld.exe: Can't change dir to 'C:\Program Files\MySql\MySQL Server 5.1\data\' (Errcode: 2)
100825 0:44:43 [ERROR] Aborting

100825 0:44:43 [Note] C:\Webserv\MariaDB/bin/mysqld.exe: Shutdown complete

OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  C:\Webserv\MariaDB/bin/mysqladmin -u root password 'new-password'
  C:\Webserv\MariaDB/bin/mysqladmin -u root -h Yehuda-W7 password 'new-password'

Alternatively you can run:

  C:\Webserv\MariaDB/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd C:/Program Files/MySql/MySQL Server 5.1 ; C:\Webserv\MariaDB/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the C:/Program Files/MySql/MySQL Server 5.1/bin/mysqlbug script!

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

---------------------------------------------------------------------

I do have MySQL installed, but it is in C:\Webserv\MySQL, nothing to do with program files.
What I think would be best for us windows users is a configuration wizard like MySQL has.
The other option is some readme, ANYWHERE in the project telling windows users how to configure their installation.

Question information

Language:
English Edit question
Status:
Answered
For:
MariaDB Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Sergei Golubchik (sergii) said :
#1

we are working on the windows installer, yes.

As for your specific problem, I don't know for sure, but looks like you have (or had) MySQL installed and mariadb server picks up my.ini file from your mysql installation. And this my.ini refers to C:\Program Files\MySql/MySQL Server 5.1.

Revision history for this message
Yehuda Katz (yakatz) said :
#2

I do have MySQL, but I was hoping to be able to install both at once.
Iam testing for a client who asked about installing it on one of our servers, but if I can't have it work next to the MySQL that other clients are used to, I can't use it.

Revision history for this message
Yehuda Katz (yakatz) said :
#3

I accidentally hit "solved".
I am not 100% sure it is solved, but I would like to get some comments on that.

Revision history for this message
Sergei Golubchik (sergii) said :
#4

on windows MySQL (and MariaDB) look for my.ini in the following locations:

GetSystemWindowsDirectory() (e.g. C:\Windows\System32)
GetWindowsDirectory() (e.g. C:\Windows)
C:\
Directory above where the executable is located
%MYSQL_HOME%

you can move your MySQL's my.ini into C:\Program Files/MySql\MySQL Server 5.1
to make sure that only MySQL and not MariaDB can see it.

Alternatively you can tell MariaDB to ignore my.ini files in all the above locations by using --no-defaults or --defaults-file command line switch. See http://dev.mysql.com/doc/refman/5.5/en/option-files.html#option-file-options

Can you help with this problem?

Provide an answer of your own, or ask Yehuda Katz for more information if necessary.

To post a message you must log in.