Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 5, 2013, 12:43 PM   #1
mripah
macrumors newbie
 
Join Date: Oct 2010
Trying to set up a testing server & MySQL Problem

Hello all,

Just bought a Macbook Air. I'm trying to set up a testing server on it but I'm stuck at a particular step.

I have apache set up and can reach the Sites folder I created in my home directory.

http://127.0.0.1/~username/sqrt/

I have php running as the info.php file I created works.

My issue is with mysql.

I downloaded and installed the latest version from mysql.com and installed it. I installed the preference panel. But is there a guide on creating and maintaining a mysql instance from the command line? Every one I see saying to start by typing mysql in terminal, but it tells me that it's not installed. But the preference panel tells me different. Thanks.
mripah is offline   0 Reply With Quote
Old Jul 5, 2013, 01:16 PM   #2
matpb
macrumors newbie
 
Join Date: Jul 2012
Can you try this in the terminal
Code:
which mysql
Your $PATH might not be including your fresh install of MySQL.
As an example, for my current installation, the bin is in /usr/local/mysql/bin/mysql
matpb is offline   0 Reply With Quote
Old Jul 5, 2013, 01:23 PM   #3
mripah
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Hmm that command just returns me to the prompt without any information.

However I see:
/usr/local/mysql/bin/mysql

At the same path on my machine.

Last edited by mripah; Jul 5, 2013 at 02:10 PM.
mripah is offline   0 Reply With Quote
Old Jul 5, 2013, 02:36 PM   #4
960design
macrumors 6502
 
Join Date: Apr 2012
Location: Destin, FL
Might I recommend MAMP?

There's nothing wrong with the way you are doing it, after the setup it's rock solid. I just find MAMP too easy NOT to use.
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Jul 5, 2013, 02:43 PM   #5
eddiedu
macrumors newbie
 
Join Date: Jul 2013
Hi,

Im not sure what is wrong but in my case i needed to run a script to complete the mysql installation, in the mysql folder i executed this command:
./scripts/mysql_install_db

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

Hope it helps.

Regards,
Edu


Quote:
Originally Posted by mripah View Post
Hmm that command just returns me to the prompt without any information.

However I see:
/usr/local/mysql/bin/mysql

At the same path on my machine.
eddiedu is offline   0 Reply With Quote
Old Jul 5, 2013, 02:55 PM   #6
mripah
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Well I downloaded Sequel Pro and was able to connect and create a database and a new user, plus grant permissions. (Bare in mind this is all new to me.)

But I can't connect in Coda2 which is what I'm using for development. Not sure why I can connect in one but not the other. The error I'm getting in Coda is:

http://db.tt/pOwF8Zim

I'm trying to connect via MySQL Socket.

----------

Quote:
Originally Posted by eddiedu View Post
Hi,

Im not sure what is wrong but in my case i needed to run a script to complete the mysql installation, in the mysql folder i executed this command:
./scripts/mysql_install_db

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

Hope it helps.

Regards,
Edu
I think it's installed and running. It says it's running in the preference panel and when I look at all process, I can see it running happily there.
mripah is offline   0 Reply With Quote
Old Jul 5, 2013, 03:19 PM   #7
mripah
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Well I figured out how to connect from Coda, I had to connect to /tmp/mysql.sock. Is there a "Hello world" query I can run to make sure I'm connected and it's running?

Last edited by mripah; Jul 5, 2013 at 03:57 PM.
mripah is offline   0 Reply With Quote
Old Jul 6, 2013, 09:31 AM   #8
eddiedu
macrumors newbie
 
Join Date: Jul 2013
Hi, a simple query to test mysql could be:
select now();

Quote:
Originally Posted by mripah View Post
Well I figured out how to connect from Coda, I had to connect to /tmp/mysql.sock. Is there a "Hello world" query I can run to make sure I'm connected and it's running?
eddiedu is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:29 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC