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 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;
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'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!