zoukankan      html  css  js  c++  java
  • phpmyadmin 连接远程数据库

    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    // $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['host'] = 'IP';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    /* Select mysql if your server does not have mysqli */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    

    如果远程数据库端口不是3306,可以加在后面

    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    // $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['host'] = 'IP:端口号';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    /* Select mysql if your server does not have mysqli */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    

    这个时候,你访问phpmyadmin,就直接用远程的账号密码登录即可。

  • 相关阅读:
    ElasticSearch入门 第一篇:Windows下安装ElasticSearch
    Elasticsearch+Logstash+Kibana教程
    MySQL组合索引最左匹配原则
    mysql 有哪些索引
    MySQL配置优化
    MySQL分区和分表
    MySQL优化
    MySQL锁详解
    MySQL各存储引擎
    MySQL索引类型
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/14760548.html
Copyright © 2011-2022 走看看