$cfg['Servers'][$i]['host'] = 'localhost'; //如果MySQL服务和Web服务主机不同,填写
                                           //MySQL服务主机名
$cfg['Servers'][$i]['port'] = '3306';      //如果商城主机设置有变,改为相应值
$cfg['Servers'][$i]['socket']        = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';// 连接协议:tcp or socket
$cfg['Servers'][$i]['controluser']   = '';   // MySQL control user settings
                                             // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';   // access to the "mysql/user"
                                             // and "mysql/db" tables)
$cfg['Servers'][$i]['auth_type']='http'; //用户验证方式:config, http or cookie
                                           //建议设为http.在访问时进行验证
//以下二项当上面的选项为config时填写
$cfg['Servers'][$i]['user'] = 'xxxxx';      // 分配给你的用户名.
$cfg['Servers'][$i]['password']='xxxxxxx';  // 你的登录密码.
                                                   
$cfg['Servers'][$i]['only_db']= 'xxxxx';    // 分配给你的数据库名.
include('lang/chinese_gb.inc.php');   //设为中文环境.

解决方案 »

  1.   

    (2003-03-12 17:46:55)   &ylx
    看到你的问题了
    我不会回答,不可以做朋友啊
    (2003-03-12 17:49:31)   露珠儿
    你又不是高手
    我每天工作很忙碌,对不起,我只能和高手请教问题
      

  2.   

    技巧问题 Mysql的远程连接出现"Lost connection to MySQL server during query" 
    安装完了RH 8.0用自带的mysql以后直接在本机上可以正常使用mysql登陆,用
    mysql -u root -p
    添加了一些用户,如* beginner pass
    即beginner可以从任何地方通过密码可以访问这台Mysql服务器(假设我的mysql服务器为mysql.test.com)
    但当我运行
    mysql -h mysql.test.com -u beginner -p
    就提示:
    ERROR 2013: Lost connection to MySQL server during query
    其实我只要输入
    mysql -h mysql.test.com时就出现上面的提示,也就是说它根本还没有到验证密码那一步。<br>
     
    技巧主题 根目录-=>系统服务-=>数据服务
     
    技巧作者 nixe0n 
    发表时间 2002-11-29 23:23:51 --------------------------------------------------------------------------------这个问题是由于glibc的一个bug造成的。
    在glibc某些版本中,gethostbyaddr函数(确切地说是_nss_dns_gethostbyaddr_r)存在缓冲区溢出问题,在处理大数据时会造成SEGMENT FAULT。在处理远程连接时,mysqld会调用ip_to_hostname()函数,再由这个函数调用gethostbyaddr函数,最后系统在执行nss_dns_gethostbyaddr_r函数处崩溃。因此,会出现上述情况。解决问题的办法是升级glibc。  
      

  3.   

    Thread: 2013 - Lost connection to MySQL server during query
    iamtgo3 I am getting a "2013 - Lost connection to MySQL server during query" when trying to connect to our mySQL Server on a linux box. We have 2 of them one works just fine and after my boss did Redhat updates I can not login to mySQL with mySQLFront on one of them.I am sure the number 2013 only means something to mySQLFront but thought I would mention it. 
    ralig I read on another forum (forget where) to downgrade glibc to the version that came with your original version of linux. In the case of the forum, this person went from RH 7.2 to 7.3.Ralig 
    iamtgo3 ralig Thanks for the post. Hmmm that would make sense for our situation. I will try that on monday and let you know if it works.. 
    yellow ..or you can try the following:In etc/my.cnf file add following line under [mysqld] options.set-variable=thread_stack=256kTry connecting. Should work after the 3rd attempt.