Ruby on Rails application could not be started (mysql error 2002) - mysql

I got a OSX Server, i updated it to 10.6.5 from 10.6.4.
Since then my Ruby on Rails Application (leihs) gibes me an Error.
"your config/databse.yml may not be written correctly. Please check it and fix any errors.
Your databse schema may be out of date or nonexistant. ....
The database server may not be running. Please check whether it's running, and start if it isn't
Error message:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) (Mysql:error)
Then a looong list of backtraces whitch dont really help me.
The Socket file does NOT exist, and i cant find it on other places.
Please help me, this is making me crazy.
Thanks for your time & help

I appears that your mysql server is not running. You should debug that portion of your system before looking at your rails app.
A few things to checK:
Can you connect from the command line?
Are there startup errors in your mysql log file?
Did you change IP addresses, share names or anything else that might have stuffed your mysql install?

I solved the Problem!
Reinstalling the 10.6.5 Combo Update helped.
-Download the correct Combo Update (same version (server/normal), same build)
-Stop the Services (like Web and so on..)
-Install the Update
-Restart
-Start Services
-All should work again
Thanks to all of you guys for their help.

Related

How to solve OctoberCMS database missing?

I ve just recently discovered OctoberCMS. Everything works perfectly on my localhost server. Once i deploy to production server i get the following error:
"Database missing
A database is required to access the back-end. Check the database is configured and migrated before trying again."
I have tried installing from cPanel and have also tried ftp and making sure the .env reflects my production database details, but still getting same error.
Can anyone here plz help? Thanks a lot in advance.
You should check all database accesses in config/database.php file. If the access is correct, try reading the configuration cache with php artisan config:clear.
If this does not help, and the error does not change, it is worth checking the availability of the library responsible for connecting to the base in your php.ini file. In my case, the problem was exactly there (the library was closed)
I had that error after fresh install...After restarting the php server, the error was gone

MySql Workbench, Can't connect to MySQL server on 'localhost' (10061) (2003)

This might seem like a duplicate but trust me its not
So you guys are probably familiar with the error. The server doesnt start at the beginning and when i try to start it from Startup/Shutdown it gives this error.
Most of the people with this problem fixed it by starting MySQL server manually. Yeah but problem is mine was already working, i mean the server is on both in services and task manager. But for some reason im getting this error.
So my question is, how can i fix this?
- Checking server status...
- Trying to connect to MySQL...
- Can't connect to MySQL server on 'localhost' (10061) (2003)
- Assuming server is not running
Tried finding some logs but all says the same as above
Oh and i tried shutting the server down and opening again
Do you guys think that it might be happening because it is conflicting with some other sql program? I uninstalled everything related to sql but i might miss some stuff.
Programs i used to have are
-XAMP
-SQL Manager
-Microsoft SQL Server
-Microsoft SQL Server Management Studio
Like I said though, i uninstalled them all.
You need to check for all the mysql configuration files in /etc/mysql and check for any lines containing 127.0.0.1 and bound address or skip network and comment them.
Hope it helps.
It seems like for some reason it was having a conflict with other connection or port was just wrong on set up. I tried deleting all the connections i have and started a fresh one and it worked. Weird right? Here i was thinking when you uninstall MySQL, it woudl delete all the connections too.

MYSQL Workbench connection attempt failed

I am using MYSQL Workbench.
When I tried to open my local instance of mysql, this error message pops up.
Your connection attempt failed for user 'root' from your host to server at localhost3306:
Can't create TCP/IP socket(10107)
It was fine yesterday. And I did not change any setting before.
I suspected that the mysql service has stopped. However, when I checked, it is started. But i restarted it anyway. Nothing changes. Restarted the pc too, nothing's changed.
FYI, I'm running Windows 8.1 64-bits.
Please help me.
Thanks in advance.
Sorry for the poor english.
This may be because your sql server is not running. If you have not installed the sql server get it downloaded and installed using the sql installer.
If you have already installed the sqlserver and facing this issue goto start search for services, in services check whether sqlserver is running if not enable it.

MySQL Workbench acquire access for administration?

I run MySQL 5.6 since month and everything went well. Also the MySQL Workbench 6.
I receive two errors if I would like to see the "Server Status".
1st error:
Could not acquire management access for admionistration
RuntimeError: Unable to execute comand chcp. Please make shure that
C:\Windows\System32 directory is in your PATH environment variable.
I checked the windows path variable within Win7 and there exist an entry c:\windows\system32
2nd error:
Unable exception: Current profile has no WMI enable
Any ideas?
To resolve the issue, simply click on Manage Server Instances under Server Administration column and close the screen again.
Now click on the instance again, check if the issue is fixed or report any bug.
I thought your MYSQl Service is not yet start.
Please Follow the below steps It works me like a charm.
windows + R - Type services.msc Press 'Enter' you could see many services . There is a service called MYSQl56 service if it's Disabled please Start that Service then once again restart the workbench.
For those who are still facing issue, add "C:\Windows\System32" in "path" Environmental Variable and make sure "MySQL56" service is running.
I follow those steps:
I started MySQL80 in Services.
Changed Server -> Management Access Settings -> System Profile, from Windows to Linux so then I entered into Server Status and refreshed.
I hope that can to help anybody.
If you got below error when click on Manage Import / Export option
Previously asked question Backup of mysql DB not being created is answered Exception: Current profile has no WMI enabled
I encountered this issue when trying to install my first mySQL server.
When configuring Remote Management, I overlooked the operating system setting for my server. I was using Windows but the default was set to FreeBSD. Once I changed the server OS setting to Windows, the problem went away.
I just encountered exactly the same problem - read lots of suggestions but solutions didn't work for me (I can't un-install MySQL and re-install it on a live server)...
...my resolution, and what worked for me, was to copy chcp.com from C:\Windows\System32\ to C:\Windows\SysWOW64\
I guess it's a path problem between a 32bit version of MySQL/Workbench and the 64bit OS
I got the same problem after restarting my pc and solved it by just starting wampserver!
so the solution is:
1. start wampserver- make sure apache,mysql are running and put all services online.
2.try to reconnect to the database!
Funnily enough, mine didn't work after the solution given by #mohit, and I'd rather not restart the computer as a work around as some has suggested.
After doing some digging around, I found that the mysql server service was not running
Task Manager --> Services --> [mysqlxx] right click and click start if not running. Note that. Note that [mysqlxx] could be a different format or name where xx are numbers

Failed to connect to MySQL at 127.0.0.1 in MySQL Workbench. System error 61

I'm running into a little trouble with MySQL Workbench.
This is the situation, I'm developing a database to query it remotely from Android devices. This is the first time I use MySQL Workbench, so I've followed this tutorial:
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
I have no problem creating the EER diagram and generating the SQL script. The problem comes when I try to connect to a MySQL server. I get this error:
"Failed to Connect to MySQL at 127.0.0.1:3306 with user root. Lost connection to MySQL server at 'reading initial communication packet', system error: 61"
http://img101.imageshack.us/i/capturadepantalla201104i.png/ (if the link stops working tell me)
I've also tried using the Local Socket/Pipe connection method with the MAMP Socket in '/Applications/MAMP/tmp/mysql/mysql.sock', but it gives the same error. And I've also tried using MAMP port 8889 but still nothing.
So anyone knows how to fix it? And another question, can I connect from my Android device to my laptop(where the database is placed) without using MAMP? MySQL needs MAMP to serve queries? And the last thing, am I going into the right way? Or should I do it other way?
Thanks for reading.
I had the same issue, but part of your question is what fixed it for me:
Set connection = Local Socket/Pipe
Set socket path = "/Applications/MAMP/tmp/mysql/mysql.sock" (for me - I got the path from my MySQL log upon initialisation)
Running: MBP, OSX 10.8.3 (Mountain Lion), MAMP Pro
Can't really fathom any further what your issue may be, but perhaps double check your DB is properly initialised. But, perhaps this helps someone else :)
I typed: sudo /usr/local/mysql/support-files/mysql.server start
into the terminal and it started the MySQL server successfully and I was able to connect to MYSQL workbench.
You need to sure that Mysql process is running in your system. not sure in MAC but in windows it'called mysqld.exe
well take a look
http://lists.mysql.com/mysql/124371
Most commonly happens when database/server is not running. You need to check your server, or restart it. You can do so if you have mysql workbench under server administration. Check your manual for restarting or starting the server.
On osx 10.6 using mamp pro I solved this by allowing network access in the MySQL tab from the home window. Hope it saves someone the pain too
When trying to use the MySQL Workbench and connect through an SSH tunnel, you will get this error when your SSH connection does not complete successfully (e.g. improper host, password, key file, etc)
A good way to trouble shoot this is to separately test the the ssh connection from the machine you are trying to connect from and establish that you can do so successfully.
Try closing MySQL and running it as the admin. This worked for me.
After making above improvement such as checking if mysql service is running or not, you just need to give a small password while creating connection, it is ' ' or 1 time press on space-bar in case of GUI or workbench.
After which you just need to validate your machine with server (validated HOST).
For that purpose click on 'New Server Instance' and it will configure server/HOST on your behalf itself.
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases etc now.
Thanks!!!
I solved it! On a mac just go to spotlight search on the top right of the screen and type Mysql. Turn it on.