Browse Source

Update mysql.md

Added an example with a database on a different host.
Okke Formsma 9 năm trước cách đây
mục cha
commit
c4147a5596
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      pages/common/mysql.md

+ 5 - 1
pages/common/mysql.md

@@ -8,7 +8,11 @@
 
 - Connect to a database using credentials
 
-`mysql -u {{user}} -p{{password}} {{database_name}}`
+`mysql -h {{database_host}} -u {{user}} -p{{password}} {{database_name}}`
+
+- Connect to a database on a different host. MySQL will prompt for a password if none is supplied.
+
+`mysql -h {{database_host}} -u {{user}} -p {{database_name}}`
 
 - Execute SQL statements in a script file (batch file)