简体   繁体   中英

how can I run mysql if I installed it from MAMP

So I looked at this question Find out where MySQL is installed on Mac OS X

I have MAMP installed and when I run: /Applications/MAMP/Library/bin/mysql --version It gives me correct output for mysql version.

But if I run type -a mysql it says that it wasn't found, as if I don't have mysql installed.

If I want to run mysql from the terminal I can start my MAMP server, then go to MAMP's library and run ./mysql which will start a mysql session.

HOWEVER: I do NOT want to run it using the current MAMP's server I have. ie Is there a way to run mysql from any directory, like without using MAMP at all?

您应该手动运行守护程序,但您需要在此之前通过执行诸如数据目录初始化 mysqld 之类的操作来设置数据

I downloaded mysql from mysql site http://www.mysql.com and I can run either the one on my MAMP'S server or the one locally on my machine. I just need to decide which of the two since both are running locally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM