The problem was that MySQL Workbench apparently required the "Database Management IP Address" rather than the DB Hostname.
Unable to access WordPress database with MySQL Workbench
-
11-06-2023 - |
Frage
So I've been told that the connection properties I need to access the WP database are in wp-config.php in the root of my WordPress directory. I found this file and found these values:
/** MySQL database username */
define('DB_USER', '??????????');
/** MySQL database password */
define('DB_PASSWORD', '**********');
/** MySQL hostname */
define('DB_HOST', '++++++++++');
Obviously I starred out the real values, but suffice it to say I tried to log into this database with MySQL Workbench with:
Hostname: ++++++++++
Username: ??????????
Password: **********
Port: 3306
I keep getting an "Unknown MySQL server host" when I try to connect. My WordPress site seems to work fine.
Lösung 2
Andere Tipps
Solution 1
Check MySQL Services is running ?
Run -> services.msc -> check if not then manually start. If you use WAMP Server then you forgot to start WAMP Server.
Solution 2
you can not set instance (local user)
- MySQL Workbench
- Mange Server Instances (bottom right corner)
- Connection box
- select
Local Instance ($ServerName) - root@127.0.0.1:3306 '<'Standard(TCP/IP)>
- Edit Selected
- under Parameters, Hostname change localhost or 127.0.0.1
- click Test Connection
Solution 3
Find this problem is connection problem or Workbench problem.
- Open a command prompt got to mysql bin directory path
- Type
mysql -u root -p -h 127.0.0.1 -P 3306
- Try to check you connect successfully or not.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow