I am usign codeigniter and I have hosted my web site on free hosting and everything was fine until an error occurred. The error is
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
But if I refresh the page the error is gone, but sometimes comes again and I don't why.
I have checked the forum for other errors like this and I have found that first I need to debug to understand what the error is.
It shows
Connecting to database: database_name
Connected OK:file: /home/vol11_6/byethost7.com/database_name/htdocs/application/config/database.php Line: 81
Other users say that the error comes from php.ini or mysql.default_socket was pointing to file in a non-existent directory.
My question is how am I supposed to find this php.ini or the directory like /var/lib/mysql/mysql.sock
on the free hosting. I can't find none of them.
Sorry if something was unclear.
Thank you in advance.
Related
I have a strange error appearing whenever I try to access my Piwik analytics.
It has been working fine for months and I haven't upgraded anything. The only change was that my account was 'on hold' for a few weeks due a non-payment mix-up. During this time my whole domain was unavailable.
I am on a shared hosting account with JustHost. I have both Joomla 3.8 and Piwik installed there under the one domain, Joomla continues to work no problem.
When is visit MyDomain.com/analytics I see the following error message;
Wondering if anybody would know what this means, or why it's happening. Is there something I should ask my host if they have changed? Surely it would also effect my Joomla installation too though (which it isn't)?
I have tried their support forums however it very quiet over there. It has been suggested to look in the following file piwik/config/global.ini.php and check that the database driver is defined, which it is. My config file contains the following;
[database]
host =
username =
password =
dbname =
tables_prefix =
port = 3306
adapter = PDO\MYSQL
type = InnoDB
schema = Mysql
I have created a phpinfo() page located at MyDomain.com/analytics/phpinfo.php I can see all the information, if anybody needs me to clarify anything or settings.
Any help or suggestions appreciated.
There was no .htaccess file in my MyDomain.com/analytics directory. As soon as I added one it worked!
I have installed phpMyAdmin on linux server, worked fine for a couple of weeks, but now suddenly I cannot login to phpMyAdmin anymore. I can connect from my website, but cannot login manually on the server.
I have googled and searched on this forum but alle the suggestions include editing the file /var/lib/phpmyadmin/config.inc.php
Strange thing is, this file is empty. Nothing in it. So I guess, that could be my problem, but then why is it now empty and not before? And is there a default I can restore or is this something generated upon installation?
The real question I am asking myself now is, am I hacked? If not, why would this file be empty?
EDIT: directly trying to connect via SSH gives an error too: Can`t connect to local mysql server throught socket '/var/run..'
EDIT2: I did a search for files named config.inc.php and found one in /etc/phpmyadmin, this one has a lot of settings so I guess I was looking into the wrong file.. Everything from Authentication Type is not active
Any help is appreciated!
after battling my way through every error message to try and get phpmyadmin running I am finally stumped by the last message. #2003 - The server is not responding. I think I know that its a problem between phpmyadmin and my installation of MySQL but I just cant find the hook.
I have already set the socket in the config.inc.php. I don't care if it works remotely i just need it to run locally for now. MySQL client connects just fine. I can do stuff from the command line so I know MySQL is configured and running. running typical LAMP stack CentOS 7 and mariadb. MySQL port is 3306
socket=/var/lib/MySQL/MySQL.sock (the stackoverflow web form keeps changing the case of MySQL so I am aware of the case sensitivity)
the main login page comes up fine but gives the 2003 error after typing in password. I know the correct password and I am typing it in correctly.
any help appreciated.
I cannot log in to my mySQL database server anymore.
I am currently using WAMP 2.2 on Windows 8.1 64 bits.
I tried reinstalling WAMP server but the problem still persists.
I have also edited the config.inc.php file and changed the host name from 'localhost' to '127.0.0.1'; however the problem still exists.
I found the problem, eventually. It had nothing to do with any of the configuration files though.
My ESET Smart Security antivirus updated silently and blocked the mysql application. I did not even get a notification for it!
I figured it out when I tried logging in to phpMyadmin after turning off my antivirus.
I had to allow communication for mysqld.exe in the antivirus settings.
Using the Wampmanager menus take a look at the mysql error log.
left click wampmanager -> MySQL -> MySQL log
If that does not show any [error] messages then also have a look at the 'Windows Event Viewer' in the 'Application' section for messages from MySQL.
The normal problem is a rogue 'my.ini' or 'my.cnf' file on your system. Search for these 2 files in the C;\windows folder, if you find any then delete them.
DO NOT DELETE THE my.ini FILE FREOM ANYWHERE IN THE C;\WAMP folder structure.
Recently I encountered a problem with MySQL, It was showing an error “Error : 1067 the process terminated unexpectedly” when I tried to start the service in services.msc
So I googled it but didn’t found the perfect solution. I will show how can you debug the issue. First look for file my.ini which can be found in “C:\wamp\bin\mysql\mysql5.6.17″ , open that file on look for “log-error”, this will show you the path where error log is stored. In my case it is, “c:/wamp/logs/mysql.log”.
Open the log file and look for last error you got, you should be today’s date when you tried to start the wampmysqld from services. At this stage, you will get error and understand what it say. In my case it is,
enter image description here
The folders for all databases are in “C:\wamp\bin\mysql\mysql5.6.17\data”. To fix I moved kmk folder to some other place. After this, wampmysqld in services.msc is getting started without any error.
I see the others who answered this, but the answer says to log in as root and create a new user and database. I can't even get that far. I just installed a brand new XAMPP instance, start it and when I go to localhost/phpmyadmin, I get the error message in the subject line.
I also have:
2002 No such file or directory
The server is not responding (or the local server's socket is not correctly configured)
I checked that as well and I see the socket info in the config is left blank and the comment above it says that it will just use the mysql defaults.
When I go to the status page for XAMPP, it says that the MySQL database is activated. I just can't connect to phpmyadmin.
I literally did nothing else from install to startup to trying to get to phpmyadmin.
I solved this same problem by empting cookies/cache of firefox.