How to add/use remote mysql ?

Started by Carbonzxc, February 18, 2017, 07:23:39 AM

Previous topic - Next topic

Carbonzxc

Hello, i need to add a database with remote mysql allowed for a ip. How to do it ? Thanks !

Sandeep

the process is the same, google it you'll find many tutorials

locvfx

Quote from: Carbonzxc on February 18, 2017, 07:23:39 AM
Hello, i need to add a database with remote mysql allowed for a ip. How to do it ? Thanks !

- Open port 3306 in your firewall (IN/OUT)

MYSQL:
QuoteGrant user permission on a Database
GRANT ALL PRIVILEGES ON mydb.* TO user@'localhost' IDENTIFIED BY 'password';

Grant remote access to specific IP All Database
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;

Revoke permision:
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'USERNAME'@'1.2.3.4';


Check permission
SELECT * from information_schema.user_privileges where grantee like "'USERNAME'%";