Database connection error


  • | 197 points

    I have setup several wordpress websites using laragon,
    Suddenly, I cannot access them and my navigator returns the following error:

    Warning: mysqli_real_connect(): (HY000/2002): Aucune connexion n�a pu �tre �tablie car l�ordinateur cible l�a express�ment refus�e. in C:\laragon\www\myWebsite\wp-includes\wp-db.php on line 1490
    Error establishing a database connection

    How can I resolve my problem without damaging existing databases?


  • administrators
    | 55180 points

    @mohamed_bn : Can you translate the error message to English?


  • administrators
    | 55180 points

    Btw, what is your Laragon version, MySQL version?
    If you can show me some error logs in MySQL, it will be helpful.


  • | 197 points

    The message is:
    "No connection could be established because the target computer expressly refused it"

    the laragon version is 2.0.5 160827
    when started, Laragon show the following version of Mysql: mariadb 10.1.9

    But for the content of log file, I dont know its path. could you assist me?


  • administrators
    | 55180 points

    It's on Menu > MySQL > error.log


  • administrators
    | 55180 points

    @mohamed_bn : No worries. In the future, you can fix it by opening the Terminal and type:

    mysqld --tc-heuristic-recover=ROLLBACK
    

    Please mark the topic as Solved.


  • | 197 points

    I don't found how to mark this topic as solved from the topic tool!!


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.