Setup MySQL in Debian(Raspberry Pi 3) for remote access

In Pi command line, connect to mysql as root user:
mysql -u root –p

Grant privileges to users:
GRANT ALL PRIVILEGES ON *.* TO user_name@'%' IDENTIFIED BY 'the_password';
This command will give all rights to user_name on all databases, ‘%’ represent the ip address (in this case all ip addresses).

To show the all the users granted in mysql:
select * from information_schema.user_privileges;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s