创建一个用户
2015-09-04 16:31
218 查看
insert into mysql.user(Host,User,Password) values("localhost","gisuser",password("1234"));
create database gis;
grant all privileges on gis.* to 'gisuser'@'%' identified by '1234';
create table loc_info(id varchar (32) not null ,longitude varchar(32) not null ,latitude varchar (32) not null , time DATETIME not null);
$data=$pdo->query("select DISTINCT id from loc_info");
stop time:<input type="text" name="stoptime" value="<?php echo date('Y-m-d H:i:s',time());?>"/>
grant select,insert,update,delete on gis.* to'user'@'localhost'
Identified by 'password';
[b]grant select,insert,update,delete on gis.* to'user'@'%'
Identified by 'password';[/b]
error_reporting(0);
date_default_timezone_set("UTC");
1、将当前目录中的所有“子目录”的权限设置为755;
2、将当前目录中的所有“文件”的权限设置为644。
chmod 644 -R *
chmod 755 `find -type d`
create database gis;
grant all privileges on gis.* to 'gisuser'@'%' identified by '1234';
create table loc_info(id varchar (32) not null ,longitude varchar(32) not null ,latitude varchar (32) not null , time DATETIME not null);
#include "WINSOCK2.H" #include "mysql.h" #pragma comment(lib,"libmysql.lib") int appenddb(char* uid,char*latitude,char*longitude,char*time) { MYSQL *mysql;//数据库连接句柄 mysql = (MYSQL *)malloc(sizeof(MYSQL)); mysql_init(mysql); mysql=mysql_real_connect(mysql,"localhost","test","1234","gis",3306,NULL,0); if(!mysql) { printf("conn fail... "); return FALSE; } char * strsql = new char[1000]; sprintf(strsql,"insert into loc_info(id,longitude,latitude,time) values ('%s','%s','%s','%s');",uid,latitude,longitude,time); //strcpy(strsql,"delete from loc_info;"); if(mysql_query(mysql,(char*)(LPCTSTR)strsql)) { OutputDebugString(strsql); OutputDebugString(mysql_error(mysql)); } mysql_close(mysql); free(mysql); delete strsql; }
$data=$pdo->query("select DISTINCT id from loc_info");
stop time:<input type="text" name="stoptime" value="<?php echo date('Y-m-d H:i:s',time());?>"/>
grant select,insert,update,delete on gis.* to'user'@'localhost'
Identified by 'password';
[b]grant select,insert,update,delete on gis.* to'user'@'%'
Identified by 'password';[/b]
error_reporting(0);
date_default_timezone_set("UTC");
1、将当前目录中的所有“子目录”的权限设置为755;
2、将当前目录中的所有“文件”的权限设置为644。
chmod 644 -R *
chmod 755 `find -type d`
相关文章推荐
- swap空间
- string的+操作符需要include
- 编写一个函数,它的返回值是主串中第一个字符子串的位置以后的所有字符
- 软件工程总结(二)
- scala学习之:scala的并发编程(二)
- 策略路由和路由策略的不同
- 设计模式之蝇量模式
- 多线程实战(二)线程同步
- [Flux] 2. Overview and Dispatchers
- 黑马程序员java之集合框架Collection
- vc++出现warningC4819的处理方法
- 平衡二叉树
- POJ 1004解题报告
- Ajax 无刷新上传图片
- Xcode 自动管理版本号实践
- Web母版制作和母版嵌套
- tomcat搭建成功后,无法进入管理页面的解决方法
- C++基础---静态联编与动态联编
- 最小化安装Centos7后的部署(个人)
- poj3261(后缀数组--可重叠的k次最长重复子串+二分+离散化)