Page tree
Skip to end of metadata
Go to start of metadata

 

  Throughout this article we will refer to root checkout directory for the project as YC_HOME.

Prepare MySQL for first use

 

Firstly you need to make sure that you have MySQL server installed.

We do not provide any script to control the mysql itself, so please use the normal service command as you would for a regular MySQL installation.

However we do provide a script to initialise the mysql database, which will run (as root) all the necessary sql script to setup the databases used by YesCart.

You need to startup the MySQL server, then navigate to YC_HOME in command line and run:

on Windows

YC_HOME/yc.bat dbimysql

on *nix

YC_HOME/yc.sh dbimysql

 

 We recommend that you use the above script. But should you run into trouble please consult manual operation instructions below

 

Manual installation steps

 

First login to mysql (e.g. mysql -uroot -p) and create main database:

CREATE DATABASE yes CHARACTER SET utf8 COLLATE utf8_general_ci;

Create yes database user with grants to yes database

-- grant statement creates the user if the user does not exist (as long as the no_auto_create_user is not set).
GRANT ALL ON yes.* TO yes@localhost IDENTIFIED BY 'y3$PaSs';

Run initialisation scripts (assuming you are in the YC_HOME):

# Creates table in yes database
mysql -uroot -p yes < persistence/sql/resources/mysql/create-tables.sql
# Add essential data that is needed to start up YesCart
mysql -uroot -p yes < env/setup/dbi/initdata.sql

Then you need to create payment database

CREATE DATABASE yespay CHARACTER SET utf8 COLLATE utf8_general_ci;

Create yespay database user with grants to yespay database

-- grant statement creates the user if the user does not exist (as long as the no_auto_create_user is not set).
GRANT ALL ON yespay.* TO yespay@localhost IDENTIFIED BY 'y3$PaSs';

Run initialisation scripts (assuming you are in the YC_HOME):

# Creates table in yespay database
mysql -uroot -p yespay < core-modules/core-module-payment-base/src/main/resources/sql/mysql/create-tables.sql
# Add essential data that is needed by each payment provider
mysql -uroot -p yespay < core-modules/core-module-payment-base/src/main/resources/sql/payinitdata.sql
# then for each additional payment module that you need 
mysql -uroot -p yespay < core-modules/core-module-payment-XXXX/src/main/resources/sql/payinitdata.sql

      

  • No labels