【发布时间】:2020-02-18 08:24:51
【问题描述】:
我想将我的本地 Wordpress 数据库连接到 cpanel 数据库服务器 phpmyadmin。
这是我的 wp-config 文件配置
define( 'DB_NAME', 'pixelshop' );
/** MySQL database username */
define( 'DB_USER', 'root' );
/** MySQL database password */
define( 'DB_PASSWORD', '' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
【问题讨论】:
-
你不能。 Cpanel 的 phpMyAdmin 只能访问本地数据库,而您的 localhost 服务器在 cpanel 看来是外部的。在本地安装 phpMyAdmin。
标签: mysql database wordpress phpmyadmin