Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

using terminal to connect to localhost:8888

I have mysql installed and im using terminal to connect to localhost:8888 but its not working

mysql -h localhost:8888 -u root

What am I doing wrong?

thanks in advance

Macbook Pro, Mac OS X (10.4.11)

Posted on Jul 7, 2009 5:22 PM

Reply
16 replies

Jul 8, 2009 3:33 AM in response to nerd2

update:

I am able to ssh into my machine from my machine as user@192.168.1.1 it accepts password and im in!

however, if I attempt to connect to mysql server on same machine:

ssh root@localhost

it will continue to ask for the password over and over,

I even setup no-password for root user in phpmyadmin, still nothing...

how can I resolve this?


nerd2

Jul 9, 2009 12:23 PM in response to BDAqua

I had mysql 5.0 and PHP 5.2.4 for Apache 1.3 from entropy.ch, followed al the instructions everything installed correctly I could access the test page by http://localhost... but I could not ssh into localhost.

I even had MAMP mamp.info installed same issue and tried WMAPP same ssh issue.

So im sure it has something to do with my ssh settings?

I can ssh into my machine just fine just not localhost/web server

Jul 9, 2009 12:50 PM in response to nerd2

william-computer:~ nerd$ ssh root@localhost
Password:
Password:
Password:
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Received disconnect from ::1: 2: Too many authentication failures for root
william-computer:~ nerd$ ssh root@localhost -p 8889
ssh exchangeidentification: Connection closed by remote host
william-computer:~ nerd$

Jul 9, 2009 1:53 PM in response to nerd2

System-wide configuration— (path: /etc/httpd/httpd.conf) This is the master configuration file. It contains information about the system as a whole—what directories are accessible, what plug-ins are in use, and so on. Changes to the Web server as a whole are included here.


User-directory configuration— (path: /etc/httpd/users/ username.conf ) When the Mac OS X Users System Preference panel creates a new account, it automatically adds a basic configuration file for that user within the /etc/httpd/users directory. This mini configuration file determines the security for the Web pages within a user's Sites folder.


http://www.informit.com/library/content.aspx?b=MacOS_XUnleashed&seqNum=211

Of course that may not apply to where you have the new one installed.

Jul 9, 2009 3:44 PM in response to nerd2

I think you cannot ssh to your machine as root if you didn't enable the root user on your computer (it isn't enabled by default and you shouldn't, unless you have a very good reason to do so).

If you just need a webserver for local testing of webpages you can use MAMP. If you do, simply enter

/Applications/MAMP/Library/bin/mysql -u root -p

It then asks you for your password (root) and you're done (the mysql root user has nothing to do with your systems root user). You can also use phpMyAdmin from the MAMP startpage.

That's the way I do it here and it works flawlessly. The latest MAMP comes with PHP 5.2.6 and MySQL 5.0.41. Place your pages inside /Applications/MAMP/htdocs/someFolder and then you can access them via http://localhost:8888/someFolder. Use localhost:8889 as your MySQL host in your scripts with user root/password root.

Most paths in MAMP are hardcoded, so you have to install it in /Applications (or place an alias of the MAMP folder there).

Hope it helps.

Ralf.

Jul 9, 2009 4:35 PM in response to BDAqua

kudos to the both of you! I just trashed MAMP and WMAPP and installed mysql and php, and I am now able to access via ssh commands.

I like MAMP, I just need to be able to ssh into it, if I can't ssh into it from my machine, I will not be able to ssh into from another machine...

edited by nerd2

Jul 10, 2009 1:24 AM in response to nerd2

You don't have to ssh into MAMP. You connect to your computer via ssh as any user who can execute the mysql command, e.g. ssh nerd2@192.168.1.1, and then run the mysql commandline from my last post. The mysql users are not the same users, you would use to log into your computer, they are completely separate. So you can login as nerd2 and then access mysql as root without problems. You could then remotely access the MAMP hosted pages as http://192.168.1.1:8888/someFolder.

But glad to hear, you're already up and running.

@BDAqua: Thank you for the kind welcome.

using terminal to connect to localhost:8888

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.