Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 5, 2013, 01: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, 02: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, 02: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 03:10 PM.
mripah is offline   0 Reply With Quote
Old Jul 5, 2013, 03:36 PM   #4
960design
macrumors 6502a
 
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, 03: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, 03: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, 04: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 04:57 PM.
mripah is offline   0 Reply With Quote
Old Jul 6, 2013, 10: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

Similar Threads
thread Thread Starter Forum Replies Last Post
PHP & MySQL help please. Stocktrader Web Design and Development 1 Mar 9, 2014 07:04 AM
Methods for doing local server-side scripting testing wrldwzrd89 Web Design and Development 4 Nov 28, 2013 12:35 AM
Apple Testing Television Set Prototypes, 'Isn't a Formal Project Yet' MacRumors MacRumors.com News Discussion 165 Feb 13, 2013 04:53 PM
Server Tool. Testing servers from iPhone J Christensen iPhone and iPod touch Apps 1 Dec 10, 2012 03:01 PM
MySQL Server Connection aceiswild Web Design and Development 6 Jun 30, 2012 02:14 PM

Forum Jump

All times are GMT -5. The time now is 08:55 PM.

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

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