Hello, I was able to solve my problem.
First, I checked phpmyadmin, but it had the following error
mysqli::real_connect(): (HY000/2002): No such file or directory
AI used the following tutorial to fix the problem
mysqli::real_connect(): (HY000/2002): No such file or directory
With this tutorial, I was able to login phpmyadmin
but again the database connection was not established
I entered the WordPress folder and edited the wp-config.php file and in
this line
/** Database hostname */
define('DB_HOST', 'localhost');
I changed it as follows and my problem was solved
/** Database hostname */
define('DB_HOST', '127.0.0.1');