• I try to logon with the user created in the database I can’t connect. I get the error: Error establishing a database connection

    If I change the ‘DB_USER’, to ‘root’ with no password in the wp-config.php I get right to the configuration screen.

    I have XAMPP installed on a Mac mini with OS 11.3, WordPress is installed in a subdirectory.

    Further, I created a PHP connection test file and I can’t get in with this either.

    <?php
    $servername = "localhost";
    $username = "mcsga_user";
    $password = "XXXXXXXX";
    
    // Create connection
    $conn = new mysqli($servername, $username, $password);
    
    // Check connection
    if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
    } 
    echo "Connected successfully";
    ?>

    this is an export of my user that has access to the mcsga database.

    GRANT USAGE ON *.* TO mcsga_user@% IDENTIFIED BY PASSWORD ‘*87AE701A070C45E7172C5411D7ED3EFB9276CC8A’;

    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON mcsga.* TO mcsga_user@%;

    I don’t have any idea what’s going on.

Viewing 1 replies (of 1 total)
  • So you are able to develop your website on localhost as long as you use the root login with no password. Then just do that.
    Yes there is a curious problem as to what is wrong with your mcsga_user login, not sure it is worth sorting that out. Have you asked in the XAMPP support forum ?

    Myself I use the gui of phpmyadmin to setup my localhost databases, suggest that you try that.

Viewing 1 replies (of 1 total)
  • The topic ‘can connect with root, not user_act’ is closed to new replies.