Sinisa Milivojevic wrote:
Please refer to manual:
.
There is good decription how setup privileges using 'host' table.
Below is exapmle how you can setup connections from different hosts:
GRANT ALL PRIVILEGES ON somedb.* TO 'user'@'%' identified by 'pass_1';
GRANT ALL PRIVILEGES ON somedb.* TO 'user'@'1.2.3.%' identified by
'pass_2';
use mysql;
/* We need only one record in db table with epmty 'host' field */
delete from db where db='somedb' and user='user' and host= '1.2.3.%';
update db set host= '' where db='somedb' and user= 'user';
insert into host values ('1.2.3.%', 'somedb', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
insert into host values ('%', 'somedb', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
flush privileges;
So now you can setup connenction using user='user',host='%' and
pass= 'pass_1' to 'somedb' or user='user',host='1.2.3.%' and
pass= 'pass_2' to 'somedb'.
The same for ssl connections.
Please refer to manual:
.
About possibility of only crypted connection without key/cert
authentification. I think we will add this feature in next releases.
Regards,
Gluh