Steps:
- Install MySQL:
sudo aptitude install mysql-server mysql-client
sudo mysql_secure_installation
- Start MySQL as root user by:
sudo mysql -u root -p
, MySQL server status can be check by service mariadb status
- Create new user for MyNote database:
create user 'name'@'localhost' IDENTIFIED BY 'PASSWORD'
- 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:
- Install Apache server based on your platform.
- Put all project files under web root directory of Apache server. For example
.../htdocs/
.
- 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:
- Configure database as described in 2.3.
- Configure Nginx server. This part please refer to Web Server Building On Raspberrypi (Nginx+MySQL)