MAC下搭建openfire

装了一次不成功,从新来过得.
先删除openfire ,终端分别运行
sudo rm -rf /Library/PreferencePanes/Openfire.prefPane
sudo rm -rf /usr/local/openfire
sudo rm -rf /Library/LaunchDaemons/org.jivesoftware.openfire.plist
删除mysql,

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
vim /etc/hostconfig  (and removed the line MYSQLCOM=-YES-)
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*




按照http://www.cnblogs.com/xiaodao/archive/2013/04/05/3000554.html 这个步骤进行,刚开始都没有问题.知道进行到数据库连接的部分

http://www.cnblogs.com/xiaodao/archive/2013/04/04/2999426.html 这个是mac下安装数据库.

在终端运行 mysqladmin -u root password 初始密码 的时候嗝屁了.

无法修改密码了.

不喜欢扯话题的人,直接上解决方法.

进入本地的mysql. 应该路径都一样是/usr/local/mysql ,文件夹下有一份文件叫my.cnf

打开在[mysqld]配置部分添加一行: skip-grant-tables

保存重启mysql, 直接连接数据库 mysql -u root -p


Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 34
Server version: 5.6.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
数据库开启成功.
然后
mysql> create database openfire;
mysql> use openfire
mysql> grant all privileges on openfire.* to qimeng@localhost identified by "qimeng";
mysql> flush privileges;
之后直接退出.
回到浏览器的openfire上.
用户名:qimeng
密码:qimeng
继续.成功通过
进入设置管理员的时候.不理解,我改掉admin@exxxxxx 这个邮箱,改成我自己的,密码也重新设置.成功之后,我想登陆,死活无法登陆.最后还是乖乖的使用admin@exxxxxx. 密码还不敢乱设置,密码为 admin ,成功通过.


你可能感兴趣的:(MAC下搭建openfire)