Any idea about, how to change the MySQL Hostname?
Collapse
Announcement
Collapse
No announcement yet.
MySQL Hostname
Collapse
X
-
To find the current MySQL hostname, you can execute the below command from within mysql prompt:
mysql> SHOW VARIABLES WHERE Variable_name = 'hostname';
Code:Your MySQL connection id is 1519219 Server version: 5.6.38 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SHOW VARIABLES WHERE Variable_name = 'hostname'; +---------------+-------------------------------+ | Variable_name | Value | +---------------+-------------------------------+ | hostname | <Server Hostname> | +---------------+-------------------------------+ 1 row in set (0.00 sec)
On a cPanel/WHM server, MySQL hostname is typically localhost.. MySQL installation takes the hostname of the server when it installs, so if you change the server hostname, then MySQL hostname might also be changed with it..
- Likes 1
Comment
Comment