If you need for development purposes expose a database remotely, you can do it with the next steps:
to check it out, open a terminal and run mysql -u foo -p -h REMOTEIPADRESS
Edit the file
/etc/mysql/my.cnf
, and change the binding address to 0.0.0.0
(EDIT: 2019-04-04, you may also update the file
, for a newer version of MySQL. Thanks for Dawood pointing out.)
/etc/mysql/conf.d/mysql.cnf
, for a newer version of MySQL. Thanks for Dawood pointing out.)
then restart MySQL server
Create a new user for any host in MySQL
NOTE: bear in mind that
'foo'@'localhost'
& 'foo'@'%'
are considered as a different user, you may have 2 different passwords for each of them.
Rember this procedure should be only used for development purposes not for production.
Comments
Post a Comment