zoukankan      html  css  js  c++  java
  • freebsd c链接mysql时异常

    正常的mysql登陆可以正常:

    [lzzl@freebsd ~/program/c_pro/cLearningFiles/telephone]$ mysql -h mysql -ulzzl -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 8628711
    Server version: 5.0.41 Source distribution

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql>


     

    c程序里面代码:

      if(mysql_real_connect(conn,"mysql","lzzl","**********",NULL,0,NULL,0)==NULL){
                    printf("Error:%u:%s\n",mysql_errno(conn),mysql_error(conn));
                    exit(1);
            }

    if(mysql_query(conn,"create database telephone")){
                    printf("Error:%u:%s\n",mysql_errno(conn),mysql_error(conn));
                    exit(1);
            }

    错误信息为:

    Error:1044:Access denied for user 'lzzl'@'192.168.1.%' to database 'telephone'

    ????



     

  • 相关阅读:
    Binary Tree Level Order Traversal
    Search a 2D Matrix
    Minimum Path Sum
    Remove Duplicates from Sorted Array II
    AngularJS 过滤器
    AngularJS 控制器
    AngularJS ng-model 指令
    AngularJS Scope(作用域)
    AngularJS 指令
    AngularJS表达式
  • 原文地址:https://www.cnblogs.com/xFight/p/2111955.html
Copyright © 2011-2022 走看看