MySQL8 Install
# dnf -y install mysql8.4-server
charset.cnf Create a new one with the following contents
Set default character encoding utf8mb4 for 4-byte characters such as pictographs
# vi /etc/my.cnf.d/charset.cnf
Please describe the following
[mysqld]
character-set-server = utf8mb4
[client]
default-character-set = utf8mb4
Enable the MySQL service
# systemctl enable --now mysqld
Use the "mysql_secure_installation" command to set the root user password and set some basic policies
# mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
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?
# Enable password quality check
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
# When password quality check is enabled, select strength
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 ←Each person may choose as they wish.
Please set the password for root here.
# MySQL root Set a password
New password: ← Any password
Re-enter new password: ← Enter the same password again
# Confirming the entered password is correct
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.
# Whether to delete anonymous users
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.
# Whether to disable remote login for the root user
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.
# Whether to delete the test database
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.
# Whether to reload privileged information
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
WordPress Install
1.MySQL 8.4 Configuration Changes
In MySQL 8.4, the “mysql_native_password” authentication plugin is disabled by default in favor of “caching_sha2_password”.
To use the “mysql_native_password” authentication plugin, add the following configuration to the [mysqld] section of the configuration file
# vi /etc/my.cnf.d/charset.cnf
[mysqld]
character-set-server = utf8mb4
mysql_native_password=on ←Add
[client]
default-character-set = utf8mb4
# systemctl restart mysqld
2. Create database for WordPress
As an example, assume database [wp_db] database user [wp_user] password [?Ww123456]
# mysql -u root -p
Enter password: ←Enter the root password for MySQL (it will not be displayed on the screen).
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.4.8 Source distribution
Copyright (c) 2000, 2026, 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.
#Create a dedicated database managed by WordPress
mysql> CREATE DATABASE wp_db DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected (0.00 sec)
#Create an account, set a password, and grant access to the database you created
mysql>CREATE USER 'wp_user'@'localhost' IDENTIFIED WITH mysql_native_password BY '?Ww123456';
Query OK, 0 rows affected (0.04 sec)
Notify the database that the user needs full access to the configured database
mysql> GRANT ALL ON wp_db.* TO 'wp_user'@'localhost';
Query OK, 0 rows affected (0.04 sec)
#Reload permissions
mysql> flush privileges;
#Exit MySQL
mysql> exit;
Bye
3.Wordpress Download and Extract
# cd /var/www/html/[FQDN]
# wget http://wordpress.org/latest.tar.gz
# tar xvf latest.tar.gz
4.Edit WordPress configuration file
# cd wordpress/
# cp wp-config-sample.php wp-config.php
# vi wp-config.php
Line 23 : Database Specification
define( 'DB_NAME', 'wp_db' );
Line 26 : User-specified
define( 'DB_USER', 'wp_user' );
Line 29 : Specify a password
define( 'DB_PASSWORD', '?Ww123456' );
Add the following to the last line
If you do not do this, you will be asked for FTP connection information when you add the plugin.
define('FS_METHOD', 'direct');
5.Moving Files
①Move the expanded contents under /var/www/html/[domain name for wordpress]
# cd /var/www/html/[FQDN]
# mv wordpress/* .
After confirming that the files have been moved, delete the wordpress directory and downloaded latest.tar.gz
# cd /var/www/html/[FQDN]
# rm -R -f wordpress
# rm latest.tar.gz
Make apache the owner of the wordpress directory.
# chown -R apache:apache /var/www/html/[FQDN]
6.Starting wordpress installation
You can use your browser to go to http://[FQDN]/wp-admin/install.php
Please enter the required information, such as your username and password, and begin the installation.
「Your PHP installation appears to be missing the MySQL extension which is required by WordPress.」When displayed
Install php library-related software if not already installed.
# dnf -y install php-mysqlnd
# systemctl restart mysqld
# systemctl restart httpd
Again go to http://[FQDN]/wp-admin/install.php


Click on "Login"

User Name : The user name you have just set
Password : User's password you have just set
and click "Login".

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

