Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Friday, July 11, 2014

Change database port and enable remote access

For Ubuntu system,

MySQL Database:
Change config file
vi /etc/mysql/my.cnf 
1. change 'port' under Basic Setting [mysqld] to the desired port
2. comment out binding address

Run SQL command to enable 'user' access mysql database using 'password' with all privileges:
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'password';

MongoDB change port:
Change mongodb config file:
vi /etc/mongodb.conf

Check open ports: sudo netstat -anltp