实在是头疼,mac下安装mysql的问题

2011-11-12 22:54:32 +08:00
 zuroyu
今天头脑发热换了个新版的Mysql5.1.59 ,竟然安装不成功了
ZRY-MBP:mysql zuroyu$ sudo scripts/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h ZRY-MBP.local password 'new-password'

Alternatively you can run:
./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

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

You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

---------

安装完成

---------
ZRY-MBP:bin zuroyu$ ./mysqladmin -u root password '***'
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
然后一直卡在这sock上了…… 手动touch /tmp/mysql.sock也不好用。
最后只好通过macports安装,竟然成功了~

谁了解上面那个问题的原因呢?stackoverflow的答案有手动建立,可惜无效。
4361 次点击
所在节点    问与答
7 条回复
joyqi
2011-11-12 23:43:56 +08:00
你确认mysql启动了吗
Kirkcong
2011-11-12 23:48:54 +08:00
mamp完全可以全部搞定的啊。。。囧
zythum
2011-11-13 00:00:06 +08:00
@Kirkcong mamp 是个集成环境把。人家不一定用的php,而且mamp的mysql稍微有点悲剧.
zuroyu
2011-11-13 00:12:16 +08:00
@joyqi 貌似启动不了
111113 00:07:57 mysqld_safe Logging to '/usr/local/mysql/data/ZRY-MBP.local.err'.
111113 00:07:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
111113 00:07:57 mysqld_safe mysqld from pid file /usr/local/mysql/data/ZRY-MBP.local.pid ended

@zythum @Kirkcong 嗯 python-mysql
iwege
2011-11-13 00:30:34 +08:00
好像以前遇到过这个问题...

http://drupal.org/node/184465

不知道是不是这个问题?
xi4oh4o
2011-11-13 00:50:48 +08:00
@zuroyu 看看错误日志吧,检查下文件夹权限和运行权限
victor
2011-11-13 01:01:23 +08:00
32, 64安装包和命令行略有不同哦

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/21319

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX