zoukankan      html  css  js  c++  java
  • phpmyadmin连接远程mysql

    phpmaadmin连接远程mysql
    连接远程mysql步骤
    .保证已经有�phpmyadmin,如果没有,去http://www.phpmyadmin.net/home_page/downloads.php下载,安装;文章这里用集成开发环境wamp自带的phpmyadmin示范。 进入到phpmyadmin安装目录下,这里是:C:wampappsphpmyadmin4.1.14,
    .创建文件夹config;拷贝.config.inc.php到,configconfig.inc.php
    浏览器中执行http://localhost/phpmyadmin/setup,根据自己主题填写host,user,password
    .设置保存后,拷贝.configconfig.inc.php到.config.inc.php(原来文件最好能备份一下)
    文件config.inc.php
    <?php
    /*
    * Generated configuration file
    * Generated by: phpMyAdmin 4.1.14 setup script
    * Date: Wed, 24 Sep 2014 08:15:24 +0200
    */
    /* Servers configuration */
    $i = 0;
    /* Server: 85 [1] */
    $i++;
    $cfg['Servers'][$i]['verbose'] = '85';
    $cfg['Servers'][$i]['host'] = '172.163.25.85';/*远程数据库主机*/
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['nopassword'] = true;
    $cfg['Servers'][$i]['auth_type'] = 'config';/*认证方式,以配置文件方式认证*/
    $cfg['Servers'][$i]['user'] = 'user2';/*数据库账户*/
    $cfg['Servers'][$i]['password'] = '';/*密码为空*/、
    $cfg['Servers'][$i]['AllowNoPassword'] = true;/*账户密码为空时,添加此句*/
    /* End of servers configuration */
    $cfg['DefaultLang'] = 'en';
    $cfg['ServerDefault'] = 1;
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    ?>
    $cfg['Servers'][$i]['AllowNoPassword']解释
    $cfg['Servers'][$i]['AllowNoPassword']

    Type: boolean

    Default value: false

    Whether to allow logins without a password.The default value of false for this parameter prevents unintended access to aMySQL server with was left with an empty password for root or on which ananonymous (blank) user is defined.

  • 相关阅读:
    2、词法分析--4、字面值--2、字符串拼接
    2、词法分析--3、标识符和关键字
    2、词法分析-- 1、行结构
    git本机服务器配置(四):git+TortoiseGit+gitblit配置本机服务器
    git本机服务器配置(三):Gitblit的安装
    git本机服务器配置(二):TortoiseGit的安装
    git本机服务器配置(一):git的安装
    python 中 dlib库的安装
    正向代理和方向代理的区别和使用
    php应用路径变量问题总结
  • 原文地址:https://www.cnblogs.com/2881064178dinfeng/p/7275531.html
Copyright © 2011-2022 走看看