I have my websites on a VPS - CentOS. Suddenly all of them stopped working and are showing database connection error.
I have tried restarting mysql with the following command in SSH /etc/rc.d/init.d/mysqld restart but when it tries to stop it it says "Failed".
Any idea on what could I do?
Please check you mysql log file (/var/log/mysqld.log).
Related
System Preferences show MySQL is running. I can log into MySQL in Terminal logging is root.
I have set up a local host at "localhost/~jason/". Installed phpMyAdmin to "localhost/~jason/phpMyAdmin" which seems to work. But when I try to log in as root I get "Cannot log in to the MySQL server".
I am running OSX 10.10.3. MySQL 5.6.25. phpMyAdmin 4.4.9.
You have to check your config.inc.php and try to switch between localhost and 127.0.0.1 to connect to the MySQL server
have you tried WAMP? It`s much easier and simpler. Only takes a couple of minutes to set up and it has the newest PHP and MySQL versions.
I've run into a problem here, and I'm not sure what to do. I migrated a Yosemite Mac to a new Mac Pro. Apache turns on, but MySql does not with this error: The operation couldn’t be completed. (XAMPPErrorDomain error 1.)
I didn't know if I need to reinstall MySql or upgrade it, or what this error means. I created the plist file as in the example and ran permissions, but that did not change the outcome. Going to websites in localhost, WordPress shows an error establishing db connection.
I went to Github to install MySql and it went fine, but it does not work with Xampp and Desktop Server. I chose to NOT start MySql when I rebooted, but apparently the Github version started anyway (and I cannot find a way to turn it off!) Now when I try to start MySql from Xampp, it says another version is already running.
Any help appreciated.
When I ask for version number in terminal I get this response:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
HOWEVER, when I went to /var/ and temp I found an alias for mysql.sock, BUT it was not connected to an original file... Now that file does not exist anywhere on my computer.
Open /Applications/XAMPP/xamppfiles/xampp and add this line somewhere at the top:
unset DYLD_LIBRARY_PATH
I found that what was required was a complete uninstall of MySql following this procedure: http://bytearrays.com/completely-uninstall-mysql-mac-osx/
And then a reinstall. ServerPress.com was very helpful in diagnosing the problems.
After reinstalling wampserver and copying database folders from \wamp\bin\mysql\mysqlx.y.z\ to new \wamp\bin\mysql\mysqlx.y.z\data, i get this error:
Error establishing a database connection
please kindly help out.!
First Just check mysql server is running.Can you log in to MySQL with the mysql command line ? Let's start there to see if the MySQL service is running.
Sometimes it maybe a conflict with skype.If that so,first logout from the skype & the shutdown that process and after that click and restart the wamp server.
I just upgraded my comp to the beta Yosemite and now my MySQL is giving me a connection problem.
I used to be able to run this command in terminal and get results:
/usr/local/mysql/bin/mysql -uroot -e "SELECT * FROM table_name"
But now it returns this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I'm not sure how I even set this connection up in the first place so please any answers, pretend I'm not too savvy with this... Thanks in advance!!
First, verify that your MySQL server is running:
mysql.server start
If that was not the issue, try starting the MySQL server in safe-mode using these instructions
Okay I found out what happened. When I upgraded to Yosemite, this file disappeared or something. Anyway I had to reinstall the files. Everything is here in this link under the MySQL section:
http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/
Recently I have updated from MySQL 5.1 to 5.5 and after few weeks the following error message was displayed each time I access the phpMyAdmin application:
1146 - Table 'data_dictionary.CHARACTER_SETS' doesn't exist
I have investigated the issue to the point where I have been forced to downgrade the MySQL service to 5.0.95 and then to upgrade the service once again to 5.1.
None of the above outlines steps however resolved the issue and the error message in questions still persist . This error disables me to access any database/table via the phpMyAdmin interface.
The error logs on the server are not providing additional information at all. The checked logs were:
-> mysql.err log
-> the cpanel error log
Any help will be highly appreciated
Run sudo mysql_upgrade -u root -p --force
Then restart mysql
i.e. sudo service mysql restart or sudo service mysqld restart depending on the version and distribution you have
You need to logout of phpMyAdmin then login for the change to take effect.
I was facing the same problem. It can be resolved by reconfiguring phpMyAdmin.
sudo dpkg-reconfigure phpmyadmin
Close phpMyAdmin page and