[英]How to change the ip address of phpmyadmin MySQL?
I change the ip address of my apache in my xampp but i cannot connect to my MySQL.我在我的 xampp 中更改了我的 apache 的 IP 地址,但我无法连接到我的 MySQL。 I think the problem is that my apache is not on the same network in my database.
我认为问题在于我的 apache 不在我的数据库中的同一网络上。 My apache is on 192.168.1.10.
我的 apache 在 192.168.1.10 上。 while my MySQL is on 127.0.0.1.
而我的 MySQL 在 127.0.0.1 上。 Please help me.
请帮我。 I don't know what to do.
我不知道该怎么办。 Thankyou.
谢谢你。
search for config.inc.php
in phpmyadmin folder在 phpmyadmin 文件夹中搜索
config.inc.php
and change this并改变这一点
$cfg['Servers'][$i]['host'] = '127.0.0.1';
For the version of phpmyadmin I had installed (4.6.6) the configuration file was at对于我安装的 phpmyadmin 版本(4.6.6),配置文件位于
/etc/phpmyadmin/config-db.php
/etc/phpmyadmin/config-db.php
It looks like:看起来像:
<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
## by /usr/sbin/dbconfig-generate-include
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded. *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='phpmyadmin';
$dbpass='myrealpassword';
$basepath='';
$dbname='phpmyadmin';
$dbserver='localhost';
$dbport='3306';
$dbtype='mysql';
And then obviously you just change dbserver
to 127.0.0.1
.然后显然您只需将
dbserver
更改为127.0.0.1
。 This is especially useful if you've turned of mysql name resolution by setting skip-name-resolve=1
in the mysql configuration file如果您通过在 mysql 配置文件中设置
skip-name-resolve=1
关闭了 mysql 名称解析,这将特别有用
/etc/mysql/mysql.conf.d/mysqld.cnf
/etc/mysql/mysql.conf.d/mysqld.cnf
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.