業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

Fedora43 : Mysql8 , WordPress

MySQL8

①Install

➁Start MySQL server

➂Check mysql version

④Connect to the MySQL server and change the root user password

⑤Set basic policies
Use the "mysql_secure_installation" command to set the root user password and set some basic policies

From now on, use the following command to connect to mysql

WordPress

1. Create database for Word Press

For example, let's say the database is [wp_db], the database user is [wp_user], and the password is [?Wabcd123].
However, starting with MySQL 8.4, mysql_native_password is disabled, so edit my.cnf to enable its use.

Open my.cnf and append the following:

Restart MySQL

Create a user and database

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.40 Source distribution

Copyright (c) 2000, 2024, 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> CREATE USER 'wp_user'@'localhost' IDENTIFIED WITH mysql_native_password BY '?Wwabcd123';
Query OK, 0 rows affected (0.01 sec)

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

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye

2.Wordpress Install

3.Edit WordPress configuration file

# cd wordpress/
# cp wp-config-sample.php wp-config.php
# vi wp-config.php

------------------------------------------------------------------------------------------------------------------------

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wp_db' );

/** Database username */
define( 'DB_USER', 'wp_user' );

/** Database password */
define( 'DB_PASSWORD', '?Wwabcd123' );

/** Database hostname */
define( 'DB_HOST', 'localhost' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

---------------------------------------------------------------------------------------------------------------

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
/*Also, add the following line at the end.*/
/*If you don't do this, you'll be prompted for FTP connection information when adding plugins.*/
define('FS_METHOD', 'direct');

4.Moving Files

Move the expanded contents under /var/www/html/[FQDN]

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

Make apache the owner of the wordpress directory.

5.Starting wordpress installation

You can use your browser to go to http://[FQDN]/wp-admin/install.php
If successful, the following WordPress installation information input screen will be output.

「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.

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.

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

Copied title and URL