-Transfer files (folders) from the local environment to the remote environment
Terminal
$ scp -r File name you want to send root@hostname:Remote directory you want to send (Ex.)/home/www)
・ Confirmation of file owner authority, etc.
Console
$ ls -l File name you want to check
-When you want to check the permissions of all files in the directory
Console
After moving to the directory you want to check
$ ll
-File owner authority settings, etc.
Console
$ chown -R owner:Group owner file name
Change the owner setting for the entire directory by adding -R
-When opening a file with vi, the characters are garbled and Japanese is not displayed.
Console
:set enc=utf-8
-When you want to check the latest error log when checking the log with vi
Console
:$
-Check the Apache error log
Console
$ cd /
$ vi /var/log/httpd/error_log
-Commands related to setting the security level of the password required when creating a user with MySQL
Console
-> global validate_password_policy="LOW or MEDIUM or HIGH"
-A command to display a list of password security levels in MySQL
Console
-> show global variables like '%validates%';
・ Check the status of MySQL
Console
$ systemctl status mysqld.service
・ MySQL log
Console
$ cd /
$ cat /var/log/mysql/mysqld.log
・ MySQL user list
Console
-> SELECT user, host from mysql.user
・ MySQL user creation
Console
-> create user 'username'@'hostname' identified by 'password';
-Delete MySQL user
Console
-> drop user 'username'@'hostname';
-Grant all permissions to a specific user
Console
->grant all privileges on database name.* to 'username'@'hostname';
-Reflecting changes made in MySQL
Console
-> FLUSH PRIVILEGES;