zuroyu
V2EX  ›  问与答

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

  •  
  •   zuroyu · Nov 12, 2011 · 5320 views
    This topic created in 5474 days ago, the information mentioned may be changed or developed.
    今天头脑发热换了个新版的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的答案有手动建立,可惜无效。
    7 replies  •  1970-01-01 08:00:00 +08:00
    joyqi
    joyqi
    Nov 12, 2011
    1
    你确认mysql启动了吗
    Kirkcong
    Kirkcong
    Nov 12, 2011
    2
    mamp完全可以全部搞定的啊。。。囧
    zythum
    zythum
    Nov 13, 2011
    3
    @Kirkcong mamp 是个集成环境把。人家不一定用的php,而且mamp的mysql稍微有点悲剧.
    zuroyu
    zuroyu
    OP
    Nov 13, 2011
    4
    @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
    iwege
    Nov 13, 2011
    5
    好像以前遇到过这个问题...

    http://drupal.org/node/184465

    不知道是不是这个问题?
    xi4oh4o
    xi4oh4o
    Nov 13, 2011
    6
    @zuroyu 看看错误日志吧,检查下文件夹权限和运行权限
    victor
    victor
    Nov 13, 2011
    7
    32, 64安装包和命令行略有不同哦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   930 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 17:57 · PVG 01:57 · LAX 09:57 · JFK 12:57
    ♥ Do have faith in what you're doing.