Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

Debian10.13 ; MySQL8 , WordPress

1. MySQL 8 Install

1. 1 Update package index

Install necessary packages

1.2 Importing MySQL Repository

When prompted, confirm that you want to add the MySQL 8.0 repository as default, then tab to "OK" and press the key to confirm version installation.

Once the repository is added, run the following command to install MySQL 8.0.

1.3 MySQL Install

MySQL root password input twice

View about the new authentication system

Click<OK>

Match the authentication plugin defaults and click <OK>

aptpolicy installation

operation check

Mysql version check

1.4. MySQL Server Security Settings

Run the tool mysql_secure_installation to configure security-related settings for the MySQL server.
Once executed, several security settings are initiated in the form of questions. First, you will be asked if you want to use a plugin for password validation as follows

Installation Status

Securing the MySQL server deployment.

Enter password for user root:

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: y

There are three levels of password validation policy:

LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

New password:xxxxxxxxx

Re-enter new password:xxxxxxxxx

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y

-Dropping test database…
Success.

Removing privileges on test database…
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

Finally, the security settings are complete when the message "All done!

From then on, when accessing MySQL, you must use the

2.WordPress Install

2.1 Database Creation

Create a database for Word Press (for example, in this case, the database name is "wp_db", the user name is "wp_user", and the password is "?Y123456y")
If you receive a message "Your password does not satisfy the current policy requirements" when creating an account, please make sure your password is at least 8 characters long and includes upper and lower case letters, numbers, symbols, etc.

# mysql -u root -p
Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.29 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE wp_db DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected, 2 warnings (0.00 sec)

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| wp_db |
+--------------------+
5 rows in set (0.00 sec)

mysql>CREATE USER 'wp_user'@'%' IDENTIFIED WITH mysql_native_password BY '?Y123456y';
Query OK, 0 rows affected (0.00 sec)

mysql>GRANT ALL ON wp_db.* TO 'wp_user'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye

2.2 WordPress Download and Installation

①Download and Deployment

②Edit WordPress configuration file

Edit contents of wp-config.ph

③Moving Files

After confirming that the files have been moved, delete the wordpress directory and downloaded latest-ja.tar.gz

④Make apache the owner of the wordpress directory

⑤Access from a browser
Access http://[FQDN}/wp-admin
If successful, the following WordPress installation information input screen will be output.

In Debian, "Your server's PHP does not seem to be able to use the MySQL extensions required for WordPress." If you see the message.

Install php library-related software if not already installed.

Install MYSQL Module

Restart Apache after installation is complete.

again
Access http://[FQDN]/wp-admin/install.php

On the following input screen
Site Title   Any name
Username   Any name
Password  Any password
Your Email  Administrator's email address

Enter the information and click "Install WordPress". Remember to enter your "username" and "password" as they are required to access the WordPress administration screen.

After successfully logging in, you will be able to access the following WordPress admin page

Copied title and URL