Sentora Support Forums

Full Version: Need help for developpement under Ubuntu 16.04
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all!

I did the upgrade to php 7.0 almost easily under Fedora 25. Just few ajustement, no major bugs.

But Ubuntu 16.04 give me headaches.

Topo :

The installation looks ok. Some bugs, but I can fix all post installation for troubleshooting except one.

On the sentora prompt (index.php) I've got the classical error : 

Critical Error: [0100] - Unable to connect or authenticate to the Sentora database (sentora_core).

We advice that you contact the server administrator to ensure that the database server is online and that the correct connecti.....

So I renamed the index.php for troubleshooting and I did a new one.


<?php
    try {
        $db = new PDO('mysql:host=localhost;dbname=sentora_core;charset=utf8', 'root', 'MyPassword_there');
        $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    } catch (PDOException $e) {
        echo 'Connection failed: ' . $e->getMessage();
        exit();
    }
    echo "You are connected<br/>";
?>

Then I've got : 

Connection failed: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'



same as mysql error.log

2017-05-26T00:20:51.208147Z 4 [Note] Access denied for user 'root'@'localhost'
2017-05-26T00:20:51.411060Z 5 [Note] Access denied for user 'root'@'localhost'
2017-05-26T00:20:51.880846Z 6 [Note] Access denied for user 'root'@'localhost'
2017-05-26T00:20:52.050853Z 7 [Note] Access denied for user 'root'@'localhost'
2017-05-26T00:20:52.214923Z 8 [Note] Access denied for user 'root'@'localhost'
2017-05-26T00:20:52.385767Z 9 [Note] Access denied for user 'root'@'localhost'


Oki... fine?!?!? But i'm doing all I want under the classic mysql cli : mysql -u root pMyPassword_there

So don't understand why I can't connect root it with php pdo. 


and no! selinux is not installed lol

Any clue? Probably when this problem will be solve, I'll be able to have a sentora php 7 under Ubuntu 16.04 very soon after that.

Thank you!  Huh

Eulogy

next step I'm doing some test about the utf8... but I don't think is that.

Oki... so don't waste your time. I found the solution. mysql under Ubuntu don't let's root connected through the php pdo.

so I created a other superuser with all privilege granted and pop!! sentora works!!!

Thank you for your mental support lol!!

Eulogy!
That's great news!
MariaDB works well, without requiring an extra superuser Rolleyes