38

CodeIgniter database error when opening the site

 3 years ago
source link: https://www.codesd.com/item/codeigniter-database-error-when-opening-the-site.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

CodeIgniter database error when opening the site

advertisements

The website works fine for a while but in a few days returns this error :

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Filename: mysqli/mysqli_driver.php

Line Number: 202

Backtrace:

File: /var/www/html/application/controllers/Login.php Line: 8 Function: database

File: /var/www/html/index.php Line: 289 Function: require_once

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: core/CodeIgniter.php

Line Number: 500

Help will be appreciated

Thanks

Nipun


Three things possible. Your database has been shut down (or it has died). You have not setup database to use a unix socket when both client and server are on the same machine. Or socket is not readable and writable by web user.

Related Articles

How can I fix the error when opening the file?

Fopen and Fclose are wrapper functions in my source file that check for errors when opening the file. when I run my program, it says there was an Fopen error. I see no reason for an error during the file opening. Sorry for the long code. #include <st

Internal system error when opening the Lotus Notes XPages database

I have downloaded sample XPages database http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/SurveyToolSample and deployed it to server. I can open it without problem with my Lotus Notes 8.5.3, but my colleague cannot open it on his Lo

Multi-Step OLE DB Operation Generated Errors "When Opening the ADO Connection

I have this connection string strConnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\mydb.accdr;Persist Security Info=False;" When I try to open the connection, I get this error: Multiple-step OLE DB operation generated errors" when

Missing a usable directive or assembly reference error when deploying the site

I have a website, where the *.cs file lies in the App_Code folder (while adding a class item in my project, VS2010 suggested me to create this folder). I have a default.aspx.cs file which makes use of this class. It runs without any error when I run

LibGDX error when opening the zip file

I hope that someone here will be able to help me.. I'm working on Mac OS X and trying to build my gradle project I keep getting the following problem: Generating app in /Users/AsafM/Desktop/untitled Executing '/Users/AsafM/Desktop/untitled/gradlew cl

The network path was not found to be an error when accessing the site

I just migrated my asp.net website from one host to another. It was working fine with the old host but with the new host there is this error: Server Error in '/' Application. The network path was not found Description: An unhandled exception occurred

Get a JS error when publishing the site

Getting a: Error: ReferenceError: $ is not defined when I publish my website. Even though I have the JQuery lib added in the Layout page, and now also on the partialView that complains about not finding the JQuery lib This is how I reference it: <scr

SSL error when opening the input stream

I guess I am trying to understand how SSL works, I have grails based application as part of application process we have to open "https" connection to a 3rd party application. But running into following exception "sun.security.validator.Vali

The 'Guide must specify the type' error when opening the rc file in VS2010

I have an MFC project where everything was working perfectly fine and I checked in my code in source control (perforce). All of a sudden the .rc file wouldn't open. When I try to open, it gives an error Guideline must specify type @ line# 410 which i

Syntax error when opening the quotation mark

I'm trying to run a script for exercise 3.3 in the book Think Python: Problem: Python provides a built-in function called len that returns the length of a string, so the value of len('allen') is 5. Write a function named right_justify that takes a st

Tableau error when opening the server in the local file

When I try to download a Tableau file from the server it gives me the error Errors occured while trying to load the workbook "C:\Users\mjones\AppData\Local\TableauTemp\0rfcxdjblahblah\test1.twbx". The load was not able to complete suxccessfully.

session_regenerate_id (): Did the session object fail, when running the site through security scanners?

Is this normal, as I have tried two different scanners and they both seem to produce the same errors, so I'm assuming maybe it has to do with the way scanners work - as I don't get these errors when viewing the site normally (the site also functions

Automatically run the macro when opening the workbook?

I have not used VBA at all and was wondering if anyone could help me with automatically running a macro when opening a workbook? I get an error when opening the workbook stating: "Run-time error '424': Object required" Here is the code I tried:

MVC5 Entity Framework Code First error when creating the database When using ApplicationUser

would really appreciate a bit of guidance on how to use ApplicationUser within my own custom class in MVC5. Simple model, using scaffolding to create controller and view, sm DbContext for the default ApplicationUser (IdentityUser) from the Internet A

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK