简体   繁体   中英

Error in installing mysql using macports

I am a bit new Mac. I tried installing mysql5 using the following link:

http://matthewcarriere.com/2008/04/02/installing-mysql-on-mac-os-x-leopard-using-macports/

When I tried running the following:

sudo /opt/local/bin/mysqld_safe5 &

I got this:

[2] 59079
ps: No user named 'axww'
130911 13:35:11 mysqld_safe Starting mysqld daemon with databases from /opt/local/var/db/mysql5

After this, I tried the following:

mysqladmin5 -u root -p ping

I got the following error:

mysqladmin5: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/opt/local/var/run/mysql5/mysqld.sock' exists!

How do I fix this?

That article is obviously a bit antiquated. The modern preferred way to start a daemon installed with MacPorts is by using the port load command.

sudo port load mysql5-server

Stop it by using port unload .

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