iOS Configure XMPP Live chat-server side

Source: Internet
Author: User
Tags administrator password live chat

First, installation

Download MySQL installable DMG version to MySQL official online http://dev.mysql.com/downloads/mysql/

For example:Mac OS X ver. 10.7 (x86, 64-bit), DMG Archive

The downloaded files are: mysql-5.6.10-osx10.7-x86_64.dmg

1. Click, install in the package

2. Click Install

Once installed, the other system preferences will appear as follows:

3. Click this icon to jump out of the dialog box

Click the start MySQL server button to start MySQL

Second, open the terminal, define the MySQL alias

Enter the alias command

Alias Mysql=/usr/local/mysql/bin/mysql

Return, enter again

Alias Mysqladmin=/usr/local/mysql/bin/mysqladmin

Third, set the MySQL root account password

mysqladmin-u Root Password initial password

2. If you have finished setting the password, you need to modify it, execute the command

Mysqladmin-u root-p  Password latest password

You will then be prompted to enter your password, enter your old password, return

Iv. Connecting the database

Mysql-u root-p

Then prompt for a password, enter the initial password set in the three

2. If you log in to the MySQL database on the remote host

Mysql-h host Address-u user name-P user Password

V. Perform common MySQL database operations

Note: The following actions are sent now, after connecting to the database, enter the MySQL environment, then execute the command must have a semicolon ";"

First, connect to MySQL with root privileges

Mysql-u root-p

Then, enter the root password

1. Add new users

The format is as follows:

Grant operation permissions on the database. * To username @ Login host address identified by ' password ';

Grant, a user on a host (with the user's login password) on a database, perform certain actions permissions

(1) For example: on any host ("%"), the user (user name: test1, Password: ADC) on all databases, perform arbitrary operation permissions (very dangerous)

Grant all privileges on * * to [email protected] '% ' identified by ' ABC ';

Where all privileges means query, insert, modify, delete permissions: Select,insert,update,delete

The above command is equivalent to:

Grant Select,insert,update,delete on * * to [e-mail protected] "%" identified by "ABC";

And then refresh the permissions

Flush privileges;

(2) For example: permission to authorize the user to operate the database on the local host

Create a database (for example: OpenFire)

Create Database OpenFire;

Grant Local Host User (user name: test2, Password: 123) Access database (database name: openfire) Operation permissions

Grant all privileges the openfire.* to [e-mail protected] identified by "123";
Flush privileges;

After that, you can access the OpenFire database with a new user.

2. Update the password for the specified account (user name: Test1, New password: 1234)

Update Mysql.user set Password=password (' 1234 ') where user= "Test1" and host= "localhost";

3. Delete a user

Use MySQL Database First

Use MySQL;

Delete a local user (TEST7) from the user table in the MySQL database

Delete from user where user= "test7" and host= "localhost";

4. Show commands

(1) Show list of all databases

show databases;

Initialize only two databases, MySQL and test

Note: MySQL's system information is stored in the MySQL library, such as: Change Password and new users, is actually using this library to operate

(2) Open a database (e.g. database: OpenFire)

Use OpenFire;

(3) Show all tables in this library

Show tables;

(4) Show the structure of a table (table1)

Describe Table1;

(5) Building a library

Create database name;

(6) Building a table

Use library name; CREATE table table name (field settings list);

(7) Delete the library

drop database name;

(8) by deleting the table

drop table name;

(9) Empty the records in the table

Delete from table name;

(10) display the records in the table

SELECT * from table name;

Vi. quitting MySQL

Exit

Seven, start and stop MySQL

Start

/usr/local/mysql/share/mysql.server start

Stop it

/usr/local/mysql/bin/mysqladmin-u root-p shutdown

Enter the root password

First, download and install OpenFire

1. Download the latest OpenFire for Mac version to http://www.igniterealtime.org/downloads/index.jsp

For example: OpenFire 3.8.1, downloaded files: openfire_3_8_1.dmg

2. Click Install and perform the default action

3. Start the OpenFire service

In the other System Preferences, click OpenFire Preferences

After startup, click the Open Admin Console button to automatically open the local Web configuration page in the browser http://localhost:9090/setup/index.jsp

Second, configure the OpenFire server

1. Set the language, select Chinese

2. Host Settings

Set the host's Access IP address

Note: The domain cannot be a machine name, otherwise it will be the following error:

HTTP error:500 Internal_server_error

Local domain, to be set to 127.0.0.1

3. Database Settings

If you want to set up an external database (recommended, for example: MySQL), select Standard database connection

4. Setting up a database connection

(1) database-driven selection: MySQL, if you have installed MySQL (specific installation method can refer to the previous article: install MySQL on mac)

(2) JDBC driver, unchanged by default

Com.mysql.jdbc.Driver

(3) Database URL:

The form is as follows:

jdbc:mysql://Your host Name: port number/database name

This is set to

Jdbc:mysql://localhost:3306/openfire

where hostname [Host-name] is changed to localhost,

where the database name [Database-name] is changed to OpenFire

To solve the problem of database character encoding, you can add the following

? useunicode=true&characterencoding=utf-8&charactersetresults=utf-8

The final URL form is

Jdbc:mysql://localhost:3306/openfire?useunicode=true&characterencoding=utf-8&charactersetresults=utf-8

Note: If a database named OpenFire already exists, the following error will be reported, the connection configuration is unsuccessful

The OpenFire database schema does not appear to be installed. Follow the installation Guide to fix this error.

Pre-MySQL Database preparation works as follows:

<1> Set/usr/local/openfire folder access to read/write

Method 1: Go to Folder/usr/local/in the Finder, right-openfire folder, display introduction

Click on the lock icon in the lower right corner to unlock and set permissions to: can read and write

Method 2: Open the terminal and enter the following command

sudo chmod 777/usr/local/openfire

Where 777 means grant read and write permission, 000 means no access

<2> in the terminal, log in to MySQL

Mysql-u root-p

Then enter the root password of the database

<3> Create a database OpenFire

Create Database OpenFire;

<4> Import The data table under OpenFire resource folder Resources/database

Use OpenFire;
Source/usr/local/openfire/resources/database/openfire_mysql.sql

A row of import processes appears at the terminal

<5> Refresh Permissions

Flush privileges;

<6> quit MySQL

Exit

(4) User name and password

The username and password here is the account used to access the MySQL database: root, and the root password to install the MySQL settings

5. Feature Settings

If you do not intend to use LDAP, leave the default setting

6. Set the OpenFire server Administrator's account and password

Can fill in an admin mailbox, enter the password to be set

Complete Registration

7. Login to the management console

The default administrator account is "admin", the default administrator password "admin", if the above set a new password, then the administrator password is the new password

If you want to remove the default admin account and customize it, you need to do the following

(1) in the terminal, login to the specific database (OpenFire)

Mysql-u root-p OpenFire

Then enter the root password of the database

(2) Delete the admin account in the table "Ofuser"

Delete from Ofuser where username= ' admin ';

(3) Create a custom administrator (user name: Xiaodao, Password: 123)

INSERT into Ofuser (username, Plainpassword, Encryptedpassword, name, email, creationdate, modificationdate) VALUES (' Xia Odao ', ' 123 ', ' 123 ', ' Administrator ', ' [email protected] ', ' 0 ', ' 0 ');

NOTE: If you reset the user name, you must restart the OpenFire server

8. Background Control Interface

Third, uninstall OpenFire

1. Stop the Service

In other settings in System Preferences, open OpenFire preferences

Click the Stop OpenFire button to stop the service

2. deleting files

Open Terminal, enter the following command

sudo rm-rf/library/preferencepanes/openfire.prefpane
sudo rm-rf/usr/local/openfire
sudo rm-rf/library/launchdaemons/org.jivesoftware.openfire.plist

After the first command, you need to enter the native administrator password

Two

1, the development of the XMPP website download

2. Open Z yo? " http://www.2cto.com/kf/ware/vc/"target=" _blank "class=" Keylink ">vcgvuzmlyzs5wa2c8l3a+cjxwpjxpbwcgc3jjpq==" Http://www.2cto.com/uploadfile/Collfiles/20140821/20140821104711108.png "alt=" \ ">

3. Click Continue

4. After successful installation, open preferences, double-click the poenfire-> Pop-up window "OK"

5, then will pop up the following view to open STRRT Openfre-> Open the Page Setup Interface Open Admin Console

If you jump out of this interface, you also need to install the AVA environment and download a JAVAFOROSX.DMG installation: http://jdk7.java.net/macportpreview/

Click on the open Admin console to jump out of the Web Settings screen, select Chinese-> Continue

Domain: Enter local address 127.0.0.1

Choosing a standard database connection

6. Install mysql:http://www.cnblogs.com/xiaodao/archive/2013/04/04/2999426.html in this first

Database Url:jdbc:mysql://[host-name]:3306/[database-name]?rewritebatchedstatements=true

[Host-name] 127.0.0.1 or localhost

[Database-name] OpenFire (database name)

7.

Click Continue, if an error occurs: Then, go to preferences, turn on OpenFire Restart, then reopen the new interface, reset it

8. Set up mailbox, inherit, install successfully

Login Backstage:

iOS Configure XMPP Live chat-server side

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.