How To Install MySQL or MariaDB Services From Zip Archive

MariaDB and MySQL Icon

MySQL and MariaDB is one of those popular database system currently revolving on the back end system of major websites, or any other computer application, offline or online. It is not only for just a development tools, it is capable of handling real production system, million of transactions i think it can handle.

Here is how you can setup MySQL or Maria Db on windows machine manually from zip file not using installer that you've been downloaded from their official website. Without further ado Starigth away open Windows command line using administrator privilege.

A. MariaDB

Simply run inside bin directory will install MySQL with default installation parameters.



In MySQL, instead of running mysql_install_db.exe we run :

mysqld --initialize-insecure --user=mysql

It work the same, to initialize data directory and first MySQL user.

C. Start MySQL from console

To test our MySQL can be run or not, we can starting it from console:

mysqld --console

Start MySQL from console, don't close this console, because as soon as you close this console, MySQL will be stop too, if there's an error try to fixed it, usually it shows really clear reason of that error, and can be easily fixed.

D. Install MySQL Service

If you don't want to be bothered by starting MySQL server manually, you can follow this steps to install MySQL as Windows service to start it automatically every time you start your computer.

Follow these commands:

Add new MySQL as service and then start MySQL using cmd or terminal, using administrator privileges.

mysqld --install MySQL8

MySQL8 is the service name, you can change to whatever name you want.

And to start and stop the service, you can use this commands, using administrator privileges.

sc start MySQL8
sc stop MySQL8

If you want to Remove any MySQL services for any reason, use:

sc delete MySQL8

E. Change my.ini

To make easy configuration for your MySQL server, you can use a configuration file. Your  configuration is under YOUR_MYSQL_DIR/data directory, On Linux system it's named my.cnf, on Windows my.ini. This is just simple configuration to change MySQL port from default 3306 to 3307, if you don't want, just don't do it, it is just experiment to test whether my.ini is working or not.
And then stop and start your MySQL.

In MySQL, by default i think they don't need my.ini file, so you can create it by yourself your ini file inside YOUR_MYSQL_DIR/my.ini

Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans

How To Connect SSH Using PEM Certificate On Windows