[mysqld]
basedir=C:/mysql
#bind-address=192.168.0.20
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-opt.exe
user=admin
password=admin007
这个是my.ini的信息

解决方案 »

  1.   

    mysql问题吗?连不上吗?红灯吗?
    服务安装了吗?服务启动了吗?
      

  2.   

    权限问题吗?本机测试,用root
    密码默认为空,连接看看
      

  3.   

    去看看我的Blog,http://blog.csdn.net/fzjw有Apache、PHP的配置,还有Mysql 5.0.1的一篇文章,看了后对你会有帮助的
      

  4.   

    TO fzjw(Redundance code谢谢你文章,我今天至少认真的看过了10篇以上,都是很长的...............
      

  5.   

    [WinMySQLadmin]
    Server=C:/mysql/bin/mysqld-opt.exe
    这里错了,应该是
    Server=C:/mysql/bin/mysqld-nt.exe
      

  6.   

    $MYSQL_HOSTNAME = "localhost";
      $MYSQL_USERNAME = "root";
      $MYSQL_PASSWORD = "";  $DATABASE = "数据库";  mysql_connect($MYSQL_HOSTNAME, $MYSQL_USERNAME, $MYSQL_PASSWORD);
      mysql_select_db($DATABASE) or die(mysql_error());
      

  7.   

    <?
    $dbhost="41-607";
    $dbuser="admin";
    $dbpasswd="admin007";
    $db="diary";
    $time=date("Y-n-j")
    ?>
      

  8.   

    这是你写的连接数据库程序吗?
    根本就没有连接啊老大
    用mysql_connect(),或者mysql_pconnect()才是连接啊
      

  9.   

    <?php
    require ("config.php");
    $my_conn=@mysql_connect($dbhost,$dbuser,$dbpasswd) or die ("数据库连接失败");
    ?>
      

  10.   

    上面是config.php的,我想知道是不是用户错了?还是密码?
      

  11.   

    <?
    $dbhost="你的ip";
    $dbuser="admin";
    $dbpasswd="admin007";
    $db="diary";

    mysql_connect($dbhost, $dbuser, $dbpasswd);
    mysql_select_db($db) or die(mysql_error());
    ?>
      

  12.   

    Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using password: NO) in H:\php\diary\Diarys.php on line 17Warning: mysql_select_db(): A link to the server could not be established in H:\php\diary\Diarys.php on line 17
    数据库连接失败
      

  13.   

    <?
    $dbhost="你的ip";
    $dbuser="admin";
    $dbpasswd="admin007";
    $db="diary";

    mysql_connect($dbhost, $dbuser, $dbpasswd);
    mysql_select_db($db) or die(mysql_error());
    ?>
    提示:
    Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using password: NO) in H:\php\diary\Diarys.php on line 17Warning: mysql_select_db(): A link to the server could not be established in H:\php\diary\Diarys.php on line 17
    数据库连接失败
      

  14.   

    用户名或密码错误,检查你的Mysql数据库user表
      

  15.   

    另外,请使用PHP5的mysqli连接数据库,否则,请修改admin的密码
    mysql>set password for
         >'admin'@'localhost' = OLD_PASSWORD('newpassword');Mysql 4.0以上版本的password算法是新的,不是以前的16位密码,所以会出现密码错误的提示。
      

  16.   

    请使用PHP5的mysqli连接数据库,怎么使用???
    安装PHP5?
      

  17.   

    /phpMyadmin如何设置权限?????
      

  18.   

    更改admin 的密码,不一定使用PHP5,按照上面的方法更改就可以。
      

  19.   

    如何更改,第一次接触PHP啊mysql>set password for
         >'admin'@'localhost' = OLD_PASSWORD('newpassword');是在哪执行???
    步骤.....谢谢.....
      

  20.   

    你的Mysql在那个盘安装,就用命令提示符进入当前盘符(假设在C盘的Mysql目录),
    C:\Mysql>cd bin
    C:\Mysql\bin>mysql -uadmin -p
    Enter password:********         //输入admin的密码成功后显示一段信息,然后变成
    mysql>set password for
         >'admin'@'localhost' = OLD_PASSWORD('newpassword');所有的换行,都代表按回车,newpassword是你的admin 的密码
      

  21.   

    c:\Documents and settings\opo\run cmd.exe只有这个啊,opo是我的计算机用户名
      

  22.   

    你把Mysql安装到哪里去了???
      

  23.   

    <?php
    require ("config.php");
    $my_conn=@mysql_connect($dbhost, $dbuser, $dbpasswd) ;?>
    <? 
    if($del!=""){
    $db1 ="Delete From diary Where id=".$del;
    mysql_db_query( $db,$db1);
    header("location:Diarys.php");
    };?>
    <html>
    <head>
    <title>会写程序的鸟</title><META http-equiv=Content-Type content="text/html; charset=gb2312">
    <LINK href="style.css" type=text/css rel=stylesheet>
    <style type="text/css">
    <!--
    body {
    background-color: #F3F3F3;
    margin-left: 10px;
    margin-top: 2px;
    }
    .style1 {color: #5C656F}
    -->
    </style></head>
    <body>
    <?
    $db1= "select * from diary order by id desc";
    $sql=mysql_db_query( $db,$db1);
    while($row=mysql_fetch_array($sql)){
      $title=$row[title];
      $id=$row[id];
      $content=$row[content];
      $date=$row[date];
      $images=$row[images];
      ?>
      

  24.   

    c:\Documents and settings\opo\run cmd.exe只有这个啊,opo是我的计算机用户名----------------------无法指向到c:\mysql
      

  25.   

    我不知道什么捷径。你run CMD.exe后,cd\,转到根目录再cd Mysql给你一个连接Mysql的代码:<?php//Config.inc.php  $host = "localhost";       //主机名称,本机的为localhost,其他的用IP代替
      $username = "admin";       //用户名
      $password = "admin777";    //用户密码
      $database = "db_name";     //数据库名称  $conn = mysql_connect($host,$username,$password) or die (mysql_error());
      mysql_select_db($database) or die(mysql_error());
    ?>使用
    <?php  require_once "Config.inc.php";  $sql = "select * from table ORDER by id ASC"; //SQL语句
      $result = mysql_query($sql,$conn);  while($row = mysql_fetch_assoc($result)){
        echo $row['id'];     //id、**为table表的字段
        echo $row['**'];
        ......
      }  mysql_close($conn);    //关闭Mysql连接?>
      

  26.   

    The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole.
      

  27.   

    修改phpMyadmin的config.inc.php文件
    将$cfg['PmaAbsoluteUri']设置为你访问phpMyadmin的URL路径