数据库
peach_li
不牛不是我
展开
-
MySQL:一个建库和建表的实例1
在f:\中新建一个文本文档命名为shool.sql(注意Linux中是f://) 写入以下代码:drop database if exists school; create database school; use school; create table teacher ( id int(3) auto_increment not null primary key, na原创 2015-04-02 11:34:47 · 3025 阅读 · 0 评论 -
python mysql数据库插入timestamp
利用python向mysql数据库插入timestampdef insert_install_service_info(serviceName,nodeID,nodeIP='9.42.83.54'): conn = MySQLdb.connect(host='172.17.46.15',user='root',passwd='huxin2010') curs = conn.curso原创 2016-11-01 19:22:20 · 14759 阅读 · 0 评论 -
MySQL时区设置
MySQL 时区默认是服务器的时区。 可以通过以下命令查看 SQL代码 mysql> show variables like ‘%time_zone%’; +——————+——–+ | Variable_name | Value | +——————+——–+ | system_time_zone | CST | | time_zone | SYSTEM |原创 2016-11-01 19:19:31 · 15627 阅读 · 0 评论 -
远程访问mysql bug-解决方案
BUG-1 _mysql_exceptions.OperationalError: (2003, “Can’t connect to MySQL server on ‘172.17.46.9’ (111)”) answer-1 更改 server端和client端 /etc/mysql/my.cnf 中 bind-address =127.0.0.1为bind-address = 0.0.原创 2016-10-13 17:03:35 · 445 阅读 · 0 评论 -
SQL基本语句总结
执行顺序: SELECT select_list [ INTO new_table ] FROM table_source [ WHERE search_condition ] [ GROUP BY group_by_expression ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | D原创 2016-04-26 15:32:40 · 390 阅读 · 0 评论 -
LeetCode--181. Employees Earning More Than Their Managers
Problem: The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+--------+-----------+| Id | Name | Sala原创 2016-03-08 22:38:46 · 706 阅读 · 0 评论 -
Navicat for MySQL远程访问服务器MySQL数据库
远程访问服务器MySQL数据库1 从网上下载Navicat for MySQL,安装并打开。2登录到服务器端通过mysql -uroot -hlocalhost -p进入MySQL数据库命令行中,输入: grant all privileges on . to ‘root’@’10.108.127.14’ dentified by “sdfjljl” with grant option;原创 2015-04-09 11:48:06 · 13703 阅读 · 1 评论 -
python-shell-MySQL
这是一个用python语句实现的shell脚本编程调用MySQL数据库的简单实例,注意文章当中的 密码即可 需要更改。#!/usr/bin/python#coding=utf-8import MySQLdb#和数据库建立连接conn= MySQLdb.connect( host='localhost', port = 3306, u原创 2015-04-02 16:47:34 · 694 阅读 · 0 评论 -
UML关系和图解析
在画类图的时候,理清类和类之间的关系是重点。类的关系有泛化(Generalization)、实现(Realization)、依赖(Dependency)和关联(Association)。其中关联又分为一般关联关系和聚合关系(Aggregation),合成关系(Composition)。下面我们结合实例理解这些关系。基本概念类图(Class Diagram): 类图是面向对象系统建模中最常用原创 2016-12-07 20:54:24 · 610 阅读 · 0 评论