Home > Database > phpMyAdmin > body text

How to set up remote connection database in phpMyAdmin

angryTom
Release: 2020-02-05 15:43:16
Original
8388 people have browsed it

phpMyAdmin can locally manage your databases on Tencent Cloud and Alibaba Cloud. Do you know how to operate it? Come and learn.

How to set up remote connection database in phpMyAdmin

How to set up a remote connection database in phpMyAdmin

First, create a remote user on the server (the root account only allows local connections, Considering security, generally set up a remote login account)

Operations on the server

Use the root account to log in to mysql

#mysql -u  root  -p root的密码
mysql> GRANT ALL ON *.* TO admin@'%' IDENTIFIED BY 'admin' WITH GRANT OPTION;
Copy after login

This sentence Meaning, any computer with an IP address is allowed to access this MySQL Server using the admin account and password (admin).

Local operation

Configure the configuration file phpMyAdmin/libraries/config.default.php# in your local web service phpmyadmin

##About line 125, change host, user, and password to server-related information

$cfg['Servers'][$i]['host'] = ‘远程数据库服务器IP地址’
$cfg['Servers'][$i]['user'] = 'admin'
$cfg['Servers'][$i]['password'] = 'admin'
Copy after login
Open the address of phpMyAdmin locally with a browser and log in to the remote account.

For more phpmyadmin related technical articles, please visit the

phpmyadmin usage tutorial column!

The above is the detailed content of How to set up remote connection database in phpMyAdmin. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template