MySQL – auf die MYSQL Datenbank von außen zugreifen

29. März 2013 at 12:15
Print Friendly, PDF & Email
piw@raspberrypi:~$ mysql -u root -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON *.* to root@'192.168.178.30' IDENTIFIED BY 'my-password';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT ALL ON *.* to root@'192.168.178.20' IDENTIFIED BY 'my-password';
Query OK, 0 rows affected (0.01 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

-----------------------------------------------------------------------------
Pandora> /usr/syno/mysql/bin/mysql -u xxxxxxxx -pmypassowrd -h server_ip
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 390499

mysql> use usr_xxxxx_1
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from avrdat;
Empty set (0.20 sec)

mysql>