Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mripah

macrumors newbie
Original poster
Oct 10, 2010
15
0
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.
 

matpb

macrumors newbie
Jul 26, 2012
3
0
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
 

mripah

macrumors newbie
Original poster
Oct 10, 2010
15
0
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:

960design

macrumors 68040
Apr 17, 2012
3,691
1,548
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.
 

eddiedu

macrumors newbie
Jul 5, 2013
2
0
Hi,

I´m 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


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.
 

mripah

macrumors newbie
Original poster
Oct 10, 2010
15
0
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.

----------

Hi,

I´m 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

macrumors newbie
Original poster
Oct 10, 2010
15
0
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:

eddiedu

macrumors newbie
Jul 5, 2013
2
0
Hi, a simple query to test mysql could be:
select now();

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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.