In wp-config.php, you configure a parameter for the database host, so you’d use either the IP address or local network name for the machine with the database server. Make sure you have port 3306 open on the machine hosting the database.
Hi @sterndata
Here’s the result of what i do “Error establishing a database connection”, can you give me a sample config.php that configured already..??
thanks…
Outside of WP, can you connect to the MySQL server on the other machine?
from the command line
mysql -u DB_NAME -pDB_PASSWORD -h DB_HOST DB_NAME
where DB_* is what you have in wp-config.php in the lines that define the DB connection? (Yes, there is no space after -p)
What are you using for DB_HOST?
@sterndata
i am locally accessing the site that i made..i only trying to do if this kind of situation that can wordpress can handle..
-
This reply was modified 9 years ago by
ragnar22.
Hi @bcworkz
Do you know how to do this??
i had 2 pc, in my first pc i will import my db and run the mySql only on the xampp, and the second pc i only run the apache..i have two xampp running, now how would i view my site on the second pc if a have a separate Mysql and apache??
@sterndata
i dont have a username and password on my wp_config..i only have is db_host..how is it??..i dont know what to do this kind of situation..
Look at wp-config-sample.php for a model of what should be there and read this: https://codex.ww.wp.xz.cn/Editing_wp-config.php