0
votes

I am trying to install WordPress on Ubuntu. I have installed mysql and created a database and granted a new user permission to use it, but when I visit the domain linked to the server it asks me for the database information and then says it is invalid. I have double-checked this information, so does anyone have any suggestions why this is happening?

1
What are you using for your Database Host field? - Alex Knopp
I am using localhost. Do I need to change that? - LegendusMaximus
Is this a localhost install on your computer or on a remote server? Do you have a MySQL Clinet installed such as PHPMyAdmin? - Alex Knopp
I managed to work it out myself. I was trying to create a user and grant them privileges at the same time, which is no longer supported. As you can see, I am new to mysql. Thank you for your help - LegendusMaximus
It would be worth adding your own answer to this question to help others. - Alex Knopp

1 Answers

0
votes

I visit the domain linked to the server it asks me for the database information and then says it is invalid.

When this happens, most probable reasons would be.

  1. The actual database and schema may be unavailable. So first check if the database table is available to you. This can be done through command line, phpmyadmin, or database clients like MYSQL Workbench. Try accessing your database. If the schema is available and accessible to you, then surely wordpress too can connect to it.
  2. You have mentioned that you are trying to access the domain name, and enter credentials, which means you are trying to install via graphical user interface, as against editing wp-config.php file via ssh. So, if if you have passed the step 1, try to check if the file system is writable. Read this article for setting correct file permission. https://wordpress.org/support/article/changing-file-permissions/

Also you can include some screenshots, and add more information on the type of server configuration(apache/nginx, php, mysql versions, port configurations) you use, and the type of installations you performed.