This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Need help for developpement under Ubuntu 16.04
#1
Need help for developpement under Ubuntu 16.04
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!
Reply
Thanks given by:


Messages In This Thread
Need help for developpement under Ubuntu 16.04 - by Eulogy - 05-26-2017, 10:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
OS - Ubuntu 18.04 or Centos 8 Qrash 1 5 ,326 01-18-2021, 07:48 PM
Last Post: Jettaman
Ubuntu 18.04 vaxition 1 4 ,794 08-06-2020, 11:03 AM
Last Post: Jettaman
Php5.6 on ubuntu possible? lorenaustin 0 2 ,569 06-11-2020, 01:01 AM
Last Post: lorenaustin

Forum Jump:


Users browsing this thread: 1 Guest(s)