1. Install and configure MySQL

Steps:

  1. Install MySQL:
sudo aptitude install mysql-server mysql-client  
sudo mysql_secure_installation
  1. Start MySQL as root user by: sudo mysql -u root -p, MySQL server status can be check by service mariadb status
  2. Create new user for MyNote database: create user 'name'@'localhost' IDENTIFIED BY 'PASSWORD'
  3. Set user privileges
-- grant all privilege
GRANT all on *.* to 'username'@'localhost';
-- revoke privilege
REVOKE privilege ON databasename.tablename FROM 'username'@'host';
-- apply
FLUSH privileges;

Notice:

  • Username and password of the new account is needed for database connection configuration!

2. Implement MyNote On Apache

Steps:

  1. Install Apache server based on your platform.
  2. Put all project files under web root directory of Apache server. For example .../htdocs/.
  3. Configure Functions/connect_db.php for database connection.
  • Configure storage path for upload files in:
//global variables config
$upload_base='E://A/WorkShop/XAMPP/htdocs/www/MyNote/Storage/';//base path of upload file(such as file/photo)
$read_base='Storage/';
  • Configure username and password, change $user and $passwd as the new account.
//configure database
$database_type='mysql';
$name='system';//database name
$user='root';
$passwd='install';

3. Implement MyNote on Nginx

Steps:

  1. Configure database as described in 2.3.
  2. Configure Nginx server. This part please refer to Web Server Building On Raspberrypi (Nginx+MySQL)