Jchat:linux Chat Program 2:mysql

Source: Internet
Author: User

The database used by the software is MySQL, because it is free, open source, and is almost the best option under Linux.

The first thing to do in MySQL is to create a new database for the root user and empower the user:

1 CREATE database jchat; 2 ' huanglianjing ';

Then log in to the MySQL huanglianjing user to add the data table:

User table:

1 CREATE TABLE User 2 (3     user varchar (null,4     passwd varchar (null,5     intnull, 6     primary KEY (user)7 );

Message table:

1 CREATE TABLE MESG 2 (3     senduser varchar (null,4     recvuser varchar (  - NULL , 5     Text varchar (null,6    primary KEY (Senduser, Recvuser, text)  7 );

Message table here should be another unique ordinal attribute as the primary key, but omitted because it is relatively simple.

Jchat:linux Chat Program 2:mysql

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.