Error: Could not connect to MySQL server!

Report any found bug here. We are grateful for any useful clues.

Moderator: severin

andrews
Posts: 2
Joined: Sun 2. Oct 2011, 10:00

Re: Error: Could not connect to MySQL server!

Post by andrews » Mon 3. Oct 2011, 01:22

This sucks, everything was perfect until I made the mistake of paying for the upgrade. I've tried solutions here but no luck. I don't understand the comments related to checking out mdf repair software as it is for Windows?

Start MySQL failed MySQL wasn't able to start. Please check log for more information.

111003 12:25:58 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
111003 12:25:58 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
111003 12:25:58 [Note] Plugin 'FEDERATED' is disabled.
111003 12:25:58 InnoDB: The InnoDB memory heap is disabled
111003 12:25:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111003 12:25:58 InnoDB: Compressed tables use zlib 1.2.3
111003 12:25:58 InnoDB: Initializing buffer pool, size = 128.0M
111003 12:25:58 InnoDB: Completed initialization of buffer pool
111003 12:25:58 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/ ... nnodb.html
111003 12:25:58 [ERROR] Plugin 'InnoDB' init function returned error.
111003 12:25:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111003 12:25:58 [ERROR] Unknown/unsupported storage engine: InnoDB
111003 12:25:58 [ERROR] Aborting

111003 12:25:58 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

111003 12:25:58 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
111003 12:28:05 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
111003 12:28:05 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
111003 12:28:05 [Note] Plugin 'FEDERATED' is disabled.
111003 12:28:05 InnoDB: The InnoDB memory heap is disabled
111003 12:28:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111003 12:28:05 InnoDB: Compressed tables use zlib 1.2.3
111003 12:28:05 InnoDB: Initializing buffer pool, size = 128.0M
111003 12:28:05 InnoDB: Completed initialization of buffer pool
111003 12:28:05 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/ ... nnodb.html
111003 12:28:05 [ERROR] Plugin 'InnoDB' init function returned error.
111003 12:28:05 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111003 12:28:05 [ERROR] Unknown/unsupported storage engine: InnoDB
111003 12:28:05 [ERROR] Aborting

111003 12:28:05 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

111003 12:28:05 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

geoffbing
Posts: 1
Joined: Wed 16. Nov 2011, 12:01

Re: Error: Could not connect to MySQL server!

Post by geoffbing » Wed 16. Nov 2011, 12:09

Refer to the changing your password section of this article: http://drupal.org/node/66187

Then open this file in a text editor:

/Applications/MAMP/bin/phpMyAdmin/config.inc.php

Find this line: $cfg['Servers'][$i]['user'] - change the root in speech marks to your username (given earlier at some point). You might want to change the username in all three docs but mine is working after the first, so I've some more exploration to do.

Hope this helps! It worked for me when all else failed.

james90
Posts: 1
Joined: Tue 29. Nov 2011, 12:15
Location: Chicago,Illinois,USA
Contact:

Re: Error: Could not connect to MySQL server!

Post by james90 » Tue 29. Nov 2011, 12:23

I am also facing same problem and still can not figure out how to solve it :(

compton83 wrote:Hello,
I've downloaded MAMP and at first everything worked well. But alas I got an error. So I trashed the MAMP program and re downloaded it. Everything was fine until I tried to delete my trash with the MAMP folder and got "the operation cannot be completed because the item 'mysqld_safe' is in use." My Mysql server will not connect. I tried using the killal psuedo and changing the mysql port in preference to 3306 and it still doesn't work. I'm sure it is this doc that is causing me so much grief. When I checked the mysqld_safe in the terminal I got:

Last login: Thu Apr 8 16:56:42 on ttys000
Macintosh-5:~ williamcompton$ /Users/williamcompton/Desktop/MAMP/Library/bin/mysqld_safe ; exit;
100408 16:57:37 mysqld_safe Logging to '/Applications/MAMP/db/mysql/Macintosh-5.westell.com.err'.
chown: /Applications/MAMP/db/mysql/Macintosh-5.westell.com.err: Operation not permitted
100408 16:57:37 mysqld_safe A mysqld process already exists
logout

[Process completed]

PLEASE HELP

alexiarudolf
Posts: 1
Joined: Wed 30. Nov 2011, 11:52
Contact:

Re: Error: Could not connect to MySQL server!

Post by alexiarudolf » Wed 30. Nov 2011, 12:25

Past 2 months ago, i was also facing the same problem and was unable to connect to the MYSQL Server. I did research on it for around 2 days and tried several guides to resolve this problem but was unable. My SQL Data was stucked in there and now i was unable to access it. I then used SQL Database Recovery program to recover all the sql data and kept the data as a backup in another location. Then i reinstalled Mysql server on my system and restore the data back in it and then the problem was solved. So for that i would like to say thanks to the developer of Sql Data Recovery as they saved my very precious data.
Regards,
Alexia Rudolf
sql database recovery
" When there is a will there is a way "

debbieb
Posts: 1
Joined: Mon 5. Mar 2012, 00:57

Re: Error: Could not connect to MySQL server!

Post by debbieb » Mon 5. Mar 2012, 01:42

Isn't this a Mac forum and a Mac application? I am having the same problem but many of you are suggesting a "fix" that is for Microsoft SQL. I'm using MySQL on a on older Mac (OS X 10. 4, NOT an Intel Mac).

This is my issue:
I was using MAMP which has already been installed on my (older) Mac. I had everything working & then phpAdmin gave me an error:
Error:
MySQL said:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
I have not done anything differently.
Before, when I started the program, both Apache & MySQL servers started right up when I pressed the button which says "Start Servers". Now only Apache starts & MySQL won't. I even tried quitting the program & restarting it, and I have also tried restarting my computer.
The phpAdmin page & MAMP were open while I was doing other parts of the homework online, and this was what I saw when I went back to it.
I do not know what to do. Can someone please help?

pinion
Posts: 1
Joined: Mon 9. Apr 2012, 13:40

Re: Error: Could not connect to MySQL server!

Post by pinion » Mon 9. Apr 2012, 14:15

I was having the same problem on a fresh install using MAMP (not pro). OSX 10.7.3 MacBook Pro. I went into mamp preferences and ports and set the ports to the MySQL default 3306 while leaving the Apache port at 8888. Then I quit mamp. I fired up the command line and killed mysql with:

Code: Select all

killall -9 mysqld
When I fired MAMP back up MySQL and Apache were working great. I even got Tomcat working within minutes using this guys instructions: http://blog.mirotin.net/22/tomcat-on-ma ... simple-way

Hope this helps someone, I created an account just to post this lol

cdffit
Posts: 1
Joined: Mon 23. Apr 2012, 16:27

Re: Error: Could not connect to MySQL server!

Post by cdffit » Mon 23. Apr 2012, 23:21

I am having the exact same problem so I changed the mysql port to 3306. But now I don't know what you mean by 'command line'. Where is this command line?

Jack Rider
Posts: 1
Joined: Thu 3. May 2012, 07:25

Re: Error: Could not connect to MySQL server!

Post by Jack Rider » Thu 3. May 2012, 07:32

I can recommend you a functional tool which will solve your problem without showing any kind of error. It helped me to overcome the same situation and I assure you that you will find this application a boon for yourself.
You can take reference from Repair SQL Server, you will get the desired solution for your problem and then you can connect to SQL Server.

quilt9
Posts: 1
Joined: Fri 1. Jun 2012, 22:32

Re: Error: Could not connect to MySQL server!

Post by quilt9 » Fri 1. Jun 2012, 22:37

I was getting error 2002 after starting up MAMP. So I ran disk utility and fixed permission problems. Restarted computer. Now MySQL is back and MAMP is running normal.

Hope it helps.

lucycook
Posts: 1
Joined: Tue 17. Jul 2012, 12:41

Re: Error: Could not connect to MySQL server!

Post by lucycook » Tue 17. Jul 2012, 12:46

Dear Friend,
you can try a third party data recovery software for your corrupted sql database there are so may software which help you to restore your data back one of them is Kernel for SQL database repair you can try it.

tomasdore
Posts: 1
Joined: Mon 6. Aug 2012, 11:22

Re: Error: Could not connect to MySQL server!

Post by tomasdore » Mon 6. Aug 2012, 11:31

Hello,
I found that the below works for me, it's just a modification of perenouel's post, so thanks for that, perenouel, it's been a big help to me.

Code: Select all

lsof -i | grep mysql
This returns mysqld plus a number (plus other info), in my case the response began

Code: Select all

mysqld 573 

Now type kill plus the number that you got; in my case

Code: Select all

kill 573
I had already tried switching the ports back and forth, but that didn't help. So this may work for someone else in a similar situation.
Regards,
Tom

stangslvr
Posts: 1
Joined: Mon 20. Aug 2012, 22:04

Re: Error: Could not connect to MySQL server!

Post by stangslvr » Mon 20. Aug 2012, 22:10

I am not able to get mysql working either. I have tried for three days now to hunt down the problem with no luck. No other versions of mysql are running on my machine. I dont see two versions of my.cnf or anything else already mentioned in previous posts. Permissions look correct, I am running the latest version of Mamp Pro and Mac osx 10.7.4. I have another machine running mamp pro on 10.7.4 with NO ISSUES. This is very frustrating. Anybody have any ideas?

Here is the error log...
120820 14:55:31 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
120820 14:55:31 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
120820 14:55:31 [Note] Plugin 'FEDERATED' is disabled.
/Applications/MAMP/Library/bin/mysqld: Table 'mysql.plugin' doesn't exist
120820 14:55:31 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120820 14:55:31 InnoDB: The InnoDB memory heap is disabled
120820 14:55:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120820 14:55:31 InnoDB: Compressed tables use zlib 1.2.3
120820 14:55:31 InnoDB: Initializing buffer pool, size = 128.0M
120820 14:55:31 InnoDB: Completed initialization of buffer pool
120820 14:55:31 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
120820 14:55:31 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120820 14:55:31 InnoDB: Assertion failure in thread 140735181916512 in file fsp0fsp.c line 2102
InnoDB: Failing assertion: inode
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/ ... overy.html
InnoDB: about forcing recovery.
21:55:31 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 134066 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x40000
0 mysqld 0x000000010027a4fc my_print_stacktrace + 44

IsraelTorres
Posts: 1
Joined: Sat 22. Sep 2012, 07:05

Re: Error: Could not connect to MySQL server!

Post by IsraelTorres » Sat 22. Sep 2012, 07:15

8) Image

EI FRIENDS, I AM BRAZILIAN, U.S. I HAD THE SAME PROBLEM AND I WILL BE DESPERATE, TRIED EVERYTHING ON THE INTERNET, AND NOTHING!

BUT THERE IS A VERY EASY WAY TO SOLVE THIS PROBLEM.

MAMP PRO ONLY able.

VA ATE MySQL in MAMP AND CHANGE THE PASSWORD AND USER TO ROOT, AFTER DOING THAT, AT LAUNCH WEBPAGE MAMP. TCHARAM! ALL OK.

IN THE SAME PLACE, YOU CAN BY A NEW PASSWORD, PASSWORD NEVER CHANGE IN phpAdmin, DO THIS BY MAMP.

HUGS TO ALL! :D

applepie
Posts: 1
Joined: Tue 22. Jan 2013, 09:17

Re: Error: Could not connect to MySQL server!

Post by applepie » Tue 22. Jan 2013, 09:19

Changing the password in index.php file works for me. Thank you.

flake
Posts: 3
Joined: Fri 25. Jan 2013, 14:15

Re: Error: Could not connect to MySQL server!

Post by flake » Fri 25. Jan 2013, 16:46

Okay, so here is what makes me lose my hair:

MAMP won't start the MySQL server.
The mysql error log gives me this:
130125 17:39:32 [ERROR] /Applications/MAMP/Library/bin/mysqld: unknown option '--skip-locking'
I tried running ...MAMP/bin/startMysql.sh but that won't work either.
Apache runs just fine on port 80 but mysql won't start on 3306. It won't run on 8889 neither and even apache doesn't start on 8888.
There's no mysqld running; ps aux | grep my | grep -v grep and lsof do not return anything.

What I've tried so far and didn't help:
Reinstalling MAMP (several times)
Reinstalling MAMP after using the uninstaller
Run MAMP's Apache and XAMPP's MySQL
Start MySQL manually

I use the current version of MAMP (2.1.1) under Mac OSX 10.6.8. I also have XAMPP installed (but not running).

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests