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'

    ????



     

  • 相关阅读:
    蓝奏云的链接打不开
    数据链路层
    markdown(md)
    物理层
    计算机网络概述
    86五笔学习笔记
    Ubuntu初次使用的问题
    Hello Word!
    快速创建Flask Restful API项目
    Ubuntu环境下部署Django+uwsgi+nginx总结
  • 原文地址:https://www.cnblogs.com/xFight/p/2111955.html
Copyright © 2011-2022 走看看