Install MariaDB database on Windows

I have been using MySQL before. When using MySQL8.0, it takes up a lot of memory and the storage space seems to be a little large. I saw that MariaDB is a solution used to replace MySQL. It was quite effective before, but it seems that it cannot be used with MySQL8.0 or above. Importing a lower version of sql, or you need to change something, but with MariaDB you can import it without changing it, so I will write about the installation of this.

MariaDB official website
, click Download, select the version to download according to your needs. If you use msi, just double-click to install. There is nothing to say.
I use zip installation here.
Insert image description here

I unzip it here to the E drive.
Insert image description here

Because I have already installed it here, there is a data folder. If you decompress it normally, there is no such folder.
After decompression, add the bin path in the directory to the environment variable.
Insert image description here

Tutorial on installing MariaDB Windows ZIP package according to official documentation
运行 MariaDB 安装目录下的 bin 目录下的 mysqld_install_db.exe 程序
Insert image description here

I ran it in the command window, because the first time I used the method of installing mysql, the installation failed, resulting in the data directory, and then the double-click installation failed, so I wanted to use the command window to install it to see the error, and then re-decompressed the installation successfully. , the data directory will be generated after successful installation.

According to the official tutorial, use the following command to start the service, but using this is to start it in the foreground, and close the command window to close the service.

MariaDB安装路径\bin\mysqld.exe --console

So you can use the method of installing mysql written before to install the service and then start it.

In the command window, cd to the bin directory under the MariaDB directory and execute the following command to install the MariaDB service.

.\mysqld --install MariaDB

Insert image description here

If the installation is successful, use the following command to start the MariaDB service.

net start MariaDB

so the service starts
Insert image description here

The connection is normal
Insert image description here

Guess you like

Origin blog.csdn.net/sywdebug/article/details/132763328