mysql openfire,【记录】重新生成Openfire的全小写的MySQL数据库表项

【背景】

在:

之后,

由于Windows中对于MySQL数据库的字段区分大小写。

而之前别人代码中已经都使用了小写的数据库表项,导致OpenFire默认的驼峰发命名的数据库字段,都无法使用了。

从而直接都删除掉了。

现在需要:

确保Openfire可以重新安装。

然后重新使用小写的字母的MySQL数据库表项。

【折腾过程】

1.搜:

reinstall openfire

参考:

去打开对应的sudo vi /opt/openfire/conf/openfire.xml

把:true

改为:false

然后重启Openfire:root@bogon:~# service openfire restart

Shutting down openfire: [ OK ]

Starting openfire:

2.先去确认一下数据库:root@bogon:~# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 21377

Server version: 5.5.44-cll-lve MySQL Community Server (GPL) by Atomicorp

Copyright (c) 2000, 2015, 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> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| xxxxxxxxx |

| test |

+--------------------+

5 rows in set (0.00 sec)

mysql> exit

Bye

root@bogon:~#

果然没了之前的

openfire_xxx

3.然后再去创建:root@bogon:~# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 21391

Server version: 5.5.44-cll-lve MySQL Community Server (GPL) by Atomicorp

Copyright (c) 2000, 2015, 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_xxx;

Query OK, 1 row affected (0.00 sec)

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| openfire_xxx |

| performance_schema |

| xxxxxxxxx |

| test |

+--------------------+

6 rows in set (0.00 sec)

mysql> exit

Bye

root@bogon:~#

注意到,此时数据库openfire_xxx中没有表的:root@bogon:~# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 21427

Server version: 5.5.44-cll-lve MySQL Community Server (GPL) by Atomicorp

Copyright (c) 2000, 2015, 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> use openfire_xxx;

Database changed

mysql> show tables;

Empty set (0.00 sec)

mysql> exit

Bye

root@bogon:~#

4.登陆Openfire主页:

果然进去安装界面了:

e35abfc8d6abecabba64471bc31f313e.png

然后如正常的操作步骤,去继续安装,直到安装完成。

再去登陆控制台:

登陆:

用户名:root

密码:root

4613bf0f9cc368c8ec196ed7c05e9668.png

不过登陆失败,对于用admin无法登陆的问题,详见:

5.注意:

此处,实际上,内部已经有各个表项了,且达到了所要的效果,都已经是小写的了:root@bogon:~# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 21555

Server version: 5.5.44-cll-lve MySQL Community Server (GPL) by Atomicorp

Copyright (c) 2000, 2015, 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> use openfire_xxx;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> show tables;

+------------------------------+

| Tables_in_openfire_xxx |

+------------------------------+

| ofextcomponentconf |

| ofgroup |

| ofgroupprop |

| ofgroupuser |

| ofid |

| ofmucaffiliation |

| ofmucconversationlog |

| ofmucmember |

| ofmucroom |

| ofmucroomprop |

| ofmucservice |

| ofmucserviceprop |

| ofoffline |

| ofpresence |

| ofprivacylist |

| ofprivate |

| ofproperty |

| ofpubsubaffiliation |

| ofpubsubdefaultconf |

| ofpubsubitem |

| ofpubsubnode |

| ofpubsubnodegroups |

| ofpubsubnodejids |

| ofpubsubsubscription |

| ofremoteserverconf |

| ofroster |

| ofrostergroups |

| ofsaslauthorized |

| ofsecurityauditlog |

| ofuser |

| ofuserflag |

| ofuserprop |

| ofvcard |

| ofversion |

+------------------------------+

34 rows in set (0.00 sec)

mysql> exit

Bye

【总结】

此处,就是通过将Openfire的配置文件:

/opt/openfire/conf/openfire.xml

中的setup字段,从true改为false。

然后进入主界面,就可以重新安装,然后自动就生成mysql数据库的相关表项。

并且自动已经把所有字段都变成小写了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值