An example of an event manager working with Spring and MySQL
Open a terminal (command prompt in Microsoft Windows) and open a MySQL client as a user who can create new users.
For example, on a Linux system, use the following command;
sudo mysql --password
This connects to MySQL as root and allows access to the user from all hosts. This is not the recommended way for a production server.
To create a new database, run the following commands at the mysql prompt:
-
create database j2e_event_manager;
--> Creates the new database -
create user 'admin'@'%' identified by 'adminPassword';
--> Creates the user -
grant all on j2e_event_manager.* to 'admin'@'%';
--> Gives all privileges to the new user on the newly created database
cd complete
./mvnw spring-boot:run
http://localhost:8080/demo/register/event