ở windows, đã install mysql. theo mặc định, mysql sẽ ko cho connect từ bên ngoài localhost. vậy làm sao enable tính năng này theo mặc định. Chứ mỗi lần add db, phải enable remote connect cho user manually, khổ quá
Q12: How do I enable remote access to MySQL?
Follow the steps below:
1. Open a DOS command prompt on the Scrutinizer server.
2. Run the following command from the ~\SCRUTINIZER\mysql\bin directory:
Code:
mysql -u root --password=
3. A mysql> prompt should be displayed.
4. To create a remote user account with root privileges, run the following commands:
Code:
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
'USERNAME' is the username to be created.
'IP' is the public IP address of the remote connection.
'PASSWORD' is the password to be assigned for this username.
(IP can be replaced with % to allow this user to logon from any host or IP)