• WP installed on Debian 9.9.0, Apache, MariaDB & PHP (virtual machine). Web access verified, both internal and external, including PHP info page.

    Setup page: Cannot connect to database. It fails as though the information is entered wrong. Maybe it is, though I documented the information as the database was being created.

    Do I need to recreate the database? How do I delete the existing database?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You will need to create the DB, DB User and DB password before installation.
    Also give the DB User all permissions.

    What do you use to manage databases? PHPMyAdmin?

    Can you run this piece of code and check if you can connect to the database?

    <?php
    $link = mysqli_connect('localhost', 'username', 'password');
    if (!$link) {
    die('Could not connect: ' . mysqli_error());
    }
    echo 'Connected successfully';
    mysqli_close($link);
    ?>

    If it says Could not connect, you have a problem. You need to troubleshoot and check if the database is indeed running, or the credentials used are correct.

    Replace username and password with the ones you are using for the database user.

    Thread Starter wpondeb990

    (@wpondeb990)

    @a2hostingrj – I am at the mercy of the command line in MariaDB for management.

    I have plenty of experience with building, supporting and upgrading Windows servers, but only a bit of experience with Linux. I have been anxious to setup a LAMP system for a number of years. I chose Debian v9.9.0 (Stretch) on recommendation of a colleague with the intent of providing a solid foundation for WordPress. The LAMP installation went reasonably well, with only minor errors or problems that were easily overcome.

    The installation of WordPress also went well until I got to the point of testing the DB connection on the setup page, where I got stuck.

    I did create the Database, etc. using:
    MariaDB [(none)]> CREATE USER ‘wpuser’@’localhost’ IDENTIFIED BY ‘userpassword’;
    MariaDB [(none)]> CREATE DATABASE wp_database;
    MariaDB [(none)]> GRANT ALL ON wp_database.* TO wpuser@localhost;
    MariaDB [(none)]> FLUSH PRIVILEGES;
    MariaDB [(none)]> exit;

    I substituted ‘wpuser’ with another.
    I substituted ‘localhost’ with my (Debian) machine name.
    I substituted ‘userpassword’ with another.

    From the Windows computer running the browser to complete the WordPress setup, it can ping [by machine name] the Debian server where WordPress is installed (on local network).

    I cannot tell what I did wrong. I would like to do this part over again, but I do not know how to get rid of the database I now have or how to fix it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP Installed – Setup Page’ is closed to new replies.