Chinaunix首页 | 论坛 | 博客
  • 博客访问: 350712
  • 博文数量: 166
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1640
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-05 11:44
个人简介

文章不在长,坚持不懈记录下努力前行的脚步

文章分类

全部博文(166)

文章存档

2017年(19)

2016年(59)

2015年(88)

我的朋友

分类: Mysql/postgreSQL

2016-12-06 19:42:34

[root@mhamaster ~]# ./pymysql.py 
Traceback (most recent call last):
  File "./pymysql.py", line 2, in
    import MySQLdb
ImportError: No module named MySQLdb
[root@mhamaster ~]# yum install MySQL-python -y


[root@mhamaster ~]# ./pymysql.py 
*************************** 1 .row ***************************
           ID : 1
        stage : NONE
     errlevel : 2
  stagestatus : None
 errormessage : Access denied for user 'root'@'mhamaster' (using password: YES)
          SQL : Global environment
Affected_rows : 0
     sequence : None
backup_dbname : None
 execute_time : 0
      sqlsha1 : None
inception必须有对数据库的访问权限

[root@mhamaster ~]# ./pymysql.py 
*************************** 1 .row ***************************
           ID : 1
        stage : CHECKED
     errlevel : 0
  stagestatus : Audit completed
 errormessage : None
          SQL : use test
Affected_rows : 0
     sequence : '0_0_0'
backup_dbname : None
 execute_time : 0
      sqlsha1 : 
*************************** 2 .row ***************************
           ID : 2
        stage : CHECKED
     errlevel : 2
  stagestatus : Audit completed
 errormessage : Set charset to one of 'utf8mb4' for table 'send_fans_gift_history_info'.
                Set comments for table 'send_fans_gift_history_info'.
                Column 'send_id' in table 'send_fans_gift_history_info' have no comments.
                Set unsigned attribute on auto increment column in table 'send_fans_gift_history_info'.
                Column 'request_type' in table 'send_fans_gift_history_info' have no comments.
                Column 'request_type' in table 'send_fans_gift_history_info' is not allowed to been nullable.
                Auto increment column 'send_id' is meaningful? it's dangerous!
                Index 'IX_createdate' in table 'send_fans_gift_history_info' need 'idx_' prefix.
                Index 'IX_roomid' in table 'send_fans_gift_history_info' need 'idx_' prefix.
                Key column 'create_date' doesn't exist in table.
                Incorrect index name '(null)' in table 'send_fans_gift_history_info'.
                Key column 'room_id' doesn't exist in table.
                Incorrect index name '(null)' in table 'send_fans_gift_history_info'.
          SQL : CREATE TABLE `send_fans_gift_history_info` (  `send_id` INT(11) NOT NULL AUTO_INCREMENT,  `request_type` INT(11) DEFAULT NULL,  PRIMARY KEY (`send_id`),  KEY `IX_createdate` (`create_date`),  KEY `IX_roomid` (`room_id`)) ENGINE=INNODB CHARSET=utf8
Affected_rows : 0
     sequence : '0_0_1'
backup_dbname : 127_0_0_1_3306_test
 execute_time : 0
      sqlsha1 : 

mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t_copy_schema  |
+----------------+
1 row in set (0.00 sec)


出现error,在线数据库不会执行该sql

[root@mhamaster ~]# ./pymysql.py 
  File "./pymysql.py", line 7
    `send_id` INT(11) NOT NULL AUTO_INCREMENT,\\
                                               ^
SyntaxError: EOL while scanning string literal



[root@mhamaster ~]# ./pymysql.py 
  File "./pymysql.py", line 8
SyntaxError: Non-ASCII character '\xe9' in file ./pymysql.py on line 9, but no encoding declared; see for details


阅读(1870) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~