Note:
Please direct all future questions to Stackoverflow.com.
MAMP PRO customers can direct their questions to support.appsolute.de.
Hinweis:
Bitte posten Sie ab jetzt Ihre Fragen bei Stackoverflow.com.
Unseren Support für MAMP PRO erreichen Sie unter support.appsolute.de.

Error: Could not connect to MySQL server!

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

Moderator: severin

Error: Could not connect to MySQL server!

Postby razorx » Sat Jul 23, 2005 12:47 am

Hi there,

I just downloaded and installed MAMP today. Everything worked great, and I was quite amazed at how wonderfully designed this app is.

BUT, like the others who have poosted this bug... I get the error:

"Error: Could not connect to MySQL server!"

So I removed MAMP, and installed it again. Unfortunately, the MYSql server will not start. Only the Apache server initializes.

Any clues on this..


Thanks.
razorx
 
Posts: 1
Joined: Sat Jul 23, 2005 12:39 am

Postby franwu » Mon Jul 25, 2005 1:59 pm

Hi,

I just installed MAMP, and got the same error. Then I checked the index.php file under the /MAMP/bin/mamp/ folder, and found that it hard code the msyql connection username/password as root/root. If you changed the default root password (of course for security), you can modify the code in index.php to test MAMP. It worked for me.

good luck,
franwu
 
Posts: 1
Joined: Mon Jul 25, 2005 1:39 pm

Postby kkhipple » Thu Aug 04, 2005 2:06 pm

I also get the same error. however i was never given the opportunity to change the root password. so i dont know what the default is.

can anyone help?
kkhipple
 
Posts: 2
Joined: Thu Aug 04, 2005 2:05 pm

Postby kkhipple » Thu Aug 04, 2005 2:24 pm

kkhipple wrote:I also get the same error. however i was never given the opportunity to change the root password. so i dont know what the default is.

can anyone help?



i was able to get this working by launching MAMP and going to Preferences-> Port. And changing the MySQL port to 3306. This worked like a charm for me.

Maybe this can help someone.
kkhipple
 
Posts: 2
Joined: Thu Aug 04, 2005 2:05 pm

Postby perenouel » Mon Aug 29, 2005 3:42 pm

hi ! :)


i had the same problem, it seams like the mySQL server doesn't want to stop and try some commands :
ps aux | grep mysql < nothing
lsof -i < ah ! my god ! mysqld !
so i tried to stop the deamon with :
killall -9 mysqld
and i restart MAMP

and it works well :)


see U all ! (sorry for my bad english, but i'm french :?)
perenouel
 
Posts: 1
Joined: Mon Aug 29, 2005 3:31 pm

Postby Guntis » Sat Sep 03, 2005 10:58 pm

kkhipple wrote:i was able to get this working by launching MAMP and going to Preferences-> Port. And changing the MySQL port to 3306. This worked like a charm for me.

Maybe this can help someone.


Thanks! It helped me too! I installed MAMP and everything was fine except MySQL didn't start. Why do they use port which is not working is beyond my understanding... Also, if I change document root for Apache in MAMP preferences, it chages root only in the first instance in httpd.conf, but there is another line little bit below, which remains unchaged. Clearly a bug...
Guntis
 
Posts: 3
Joined: Sat May 07, 2005 11:22 am

same problem~

Postby edie-b » Wed Oct 19, 2005 2:42 am

I installed MAMP yesterday, and had it working great. Was very impressed. Then today I go to start working on a new template and I get the Error Message:

Error: Could not connect to MySQL server!

I tried rebooting my machine but that did not work. I also tried changing the SQL Port to 3306 but that didn't work.

In the error logs I get the following message:

051019 11:29:43 [Warning] One can only use the --user switch if running as root

051019 11:29:45 InnoDB: Started; log sequence number 0 43634
051019 11:29:45 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
051019 11:29:45 mysqld ended

I am running MAMP 1.0.1 on OS X 10.3.9, the Apache Server Light is green but the MySQL light is Red.

Any help would be much appreciated!
edie-b
 
Posts: 1
Joined: Wed Oct 19, 2005 1:26 am

Postby bumkilla » Thu Oct 27, 2005 7:48 pm

perenouel wrote:killall -9 mysqld


I'm just adding this because it took me a minute to figure out what exactly to do with the above suggestion. For those not all that acclimated to things like this (such as myself), copy that "killall" line and run it as a command in Terminal (mac osx) with MAMP running. Then, just hop back onto MAMP.


Works great, thanks.
bumkilla
 
Posts: 1
Joined: Thu Oct 27, 2005 7:43 pm

Postby tyrajosaure » Fri Nov 11, 2005 3:19 pm

Hi,

I have got exactly the same problem. I tried all the tricks you gave on this forum, and it still doesn't work.
The two lights are now green (Apache and MySQL) when I start MAMP, but the same message 'Error: Could not connect to MySQL server!' comes when I open the window.

Does some have another idea ?

Thanks
tyrajosaure
 
Posts: 2
Joined: Fri Nov 11, 2005 3:14 pm

Postby tyrajosaure » Sat Nov 12, 2005 8:11 am

Hi!

I tried again all the ways proposed to solve this problem.
And I wrote
ps aux | grep mysql
lsof -i
killall -9 mysqld
in the Terminal and then restarted MAMP.
Exactly like perenouel did.

And it worked.

Thanks.
tyrajosaure
 
Posts: 2
Joined: Fri Nov 11, 2005 3:14 pm

-

Postby cayennecode » Fri Nov 03, 2006 3:03 am

Just repair your permissions with Disk Utility, and restart your clomputer.

Yes I said clomputer, what?
cayennecode
 
Posts: 36
Joined: Tue Oct 24, 2006 11:52 pm

Postby saads10 » Fri Jan 05, 2007 5:28 pm

hi,

i have tried all the suggestions above but cant resolve the problem. I tried changing the port to 3306 but it doesnt save that. I tried changing it manually in startMySQL.sh but that doesnt solve the problem.

Are there any other suggestions resolving this problem.

thanks
saads10
 
Posts: 1
Joined: Thu Jan 04, 2007 4:15 pm

Re: Error: Could not connect to MySQL server!

Postby andre0180 » Tue Jun 24, 2008 2:17 pm

franwu wrote:Hi,
I just installed MAMP, and got the same error. Then I checked the index.php file under the /MAMP/bin/mamp/ folder, and found that it hard code the msyql connection username/password as root/root. If you changed the default root password (of course for security), you can modify the code in index.php to test MAMP. It worked for me.
good luck,



Thank you so much!
Andre
andre0180
 
Posts: 1
Joined: Tue Jun 24, 2008 2:13 pm

Re: Error: Could not connect to MySQL server!

Postby zlatan24 » Tue May 05, 2009 6:50 am

Yesterday my friend advised me good tool-mdf repair,as far as I know it is free,program repair data from corrupted databases in the MS SQL Server format (files with the *.mdf extension),supports data extraction via the local area network,can save recovered data as SQL scripts, it is also possible to split data into files of any size,compatible with all supported versions of Microsoft Windows, such as Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 Server, Windows Vista,tool supports the following database formats: Microsoft SQL Server 7.0, 2000, 2005,also can repair .mdf files of Microsoft SQL Server 2005, repair mdf file of Microsoft SQL Server 2005 (64-bit).
zlatan24
 
Posts: 4
Joined: Tue May 05, 2009 6:48 am

Re: Error: Could not connect to MySQL server!

Postby zlatan24 » Thu Jun 25, 2009 7:15 pm

tyrajosaure wrote:Hi,

I have got exactly the same problem. I tried all the tricks you gave on this forum, and it still doesn't work.
The two lights are now green (Apache and MySQL) when I start MAMP, but the same message 'Error: Could not connect to MySQL server!' comes when I open the window.

Does some have another idea ?

Thanks

On the whole in internet there is good tool to my mind-repair sql server,for the reason that program has many capabilities and as far as I can see it is free,utility repair data from corrupted databases in the MS SQL Server format (files with the *.mdf extension),supports data extraction via the local area network,can save recovered data as SQL scripts, it is also possible to split data into files of any size,compatible with all supported versions of Microsoft Windows, such as Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 Server, Windows Vista,tool supports the following database formats: Microsoft SQL Server 7.0, 2000, 2005,also can repair .mdf files of Microsoft SQL Server 2005, repair mdf file of Microsoft SQL Server 2005 (64-bit).
zlatan24
 
Posts: 4
Joined: Tue May 05, 2009 6:48 am

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests

wager-taxi