PhpMyAdmin 5.04设置登录远程数据库的方法

  1. 首先,从名字上看,必须要用到php,所以,无论windows 系统还是linux 系统,至少要安装 php 和apache2

  2. 下载phpMyAdmin 的最新版,将其解压到 网页服务目录: /var/www/html    或者是 /usr/share/nginx/html 之类的

  3. 进入 phpMyAdmin 所在目录。

  4. 对配置文件进行修改。 目前百度出来的大部分是老版本的设置,新版本已经用 config.inc.php了

    cp config.sample.inc.php config.inc.php
    cat login.remote.txt >> config.inc.php
    # 上面的login.remote.txt,是我提前编辑好的配置内容,也就是下面的部分,直接追加到配置文件末尾即可
    
    $cfg['AllowArbitraryServer'] = true;
    $cfg['Servers'][$i]['host'] = '192.168.1.250';  #这是要登录的远程Mariadb/Mysql服务器的ip
    $cfg['Servers'][$i]['port'] = '3306';           #这是远程服务器数据库所用的端口的端口号
    $cfg['Servers'][$i]['user'] = 'root';           #这个是我们远程登录的账户名。可以留空
    $cfg['Servers'][$i]['password'] = '';           #这个是账户的密码。可以留空
    
  5. 登录。 http://192.168.1.250/phpMyAdmin

 

上一篇:asm


下一篇:Discuz论坛管理员密码忘记解决方案