-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration English
This article is still in the state of draft, it will be enhanced with the evolution of HAY
HURRAY! You are about to use HAY on your PC! You just have to configure little things!
To do that, go to the folder where HAY is installed, then, open the ".env" file.
You'll find this line:
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
We'll make some modifications in this line, because this line is VERY important! She will let you access to the database that we have installed. Let me explain to you what's the role of each part of this line.
This part specify with which user you'll connect, because, yes, you can connect you with many different users in a database which have, each one, different permissions. But, HAY have to be omnipotent, then, you have to connect with the admin user who is named root. Then, replace db_user by root.
This part ask you the user's password. If you didn't add a password (with the manual installation) or you have installed with Xampp, delete this part and the two points : before. If you have installed with Mamp, replace this part with root. Else, replace with your password.
127.0.0.1 means... localhost... Yeah, yeah, the same of your web server 😄! And 3306 is a special port of localhost that let you access to the database. You can try to go to http://localhost:3306/, but this will display you an incomprehensible output. DON'T touch this part.
This part means the database name. I advise you to replace it with hay. You can put the name that you want, it will not have any impact on the HAY website. Pay just attention to not put the name of another database if you have already created one.
You only have to execute this line:
<php_directory>/php[.exe] <directory>/HAY/bin/console doctrine:database:create
If you're on Windows, remove the brackets, else, delete
[.exe].
Replace
<php_directory>by the path to PHP, if you have chosen the manual installation on Linux, just remove<php_directory>and the slash that follow. If you're using Xampp, it's in thephpfolder in the Xampp folder. For Mamp on macOS, it's in/Applications/MAMP/bin/php/phpx.x.x/bin/, replacephpx.x.xby your php version for examplephp7.2.1.
Replace
<directory>by the path to your HAY folder.
Great! If you this that is displayed, it works!
Created database `hay` for connection named default
You only have to execute this line:
<php_directory>/php[.exe] <directory>/HAY/bin/console doctrine:migrations:migrate
Do as before!
Great, HAY works! Go to http://localhost:8000/ to see the result (Don't forget to start HAY before!)!