ctake/chat
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
//mySQLに新しいアカウントを作ってデータベースを設計するまで //rootで一度ログインしてchatというアカウントを作る mysql> grant all privileges on *.* to chat@localhost identified by 'chat'; Query OK, 0 rows affected (0.00 sec) mysql> SELECT host,user from mysql.user; +-----------+------------------+ | host | user | +-----------+------------------+ | % | chat | | 127.0.0.1 | root | | ::1 | root | | localhost | | | localhost | chat | | localhost | debian-sys-maint | | localhost | root | | ubuntu | | | ubuntu | root | +-----------+------------------+ 9 rows in set (0.00 sec) saki@ubuntu:~/test/chat$ mysql -u chat -pchat Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 42 Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu) Copyright (c) 2000, 2011, 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 | | test | +--------------------+ 4 rows in set (0.10 sec) mysql> create database chat default character set utf8; Query OK, 1 row affected (0.01 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | chat | | mysql | | performance_schema | | test | +--------------------+ 5 rows in set (0.00 sec) mysql> use chat Database changed mysql> create table messages( id int primary key auto_increment, text char(140) not null, time datetime)engine=innodb;
About
node.jp+express+ejs+socket.io+mysqlでチャット
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published