Mar 19 2010

Wymuszenie SSL przy połączeniu z bazą MySQL

Tworzenie usera:

CREATE USER ‘user’@’%’ IDENTIFIED BY `123abc`;

odebranie uprawnień:

REVOKE ALL PRIVILEGES ON nazwabazy.* FROM user@`%`;

wymuszanie SSL:

GRANT SELECT, INSERT, UPDATE, DELETE ON nazwabazy.* TO user@`%` Require SSL;

lub

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW, EVENT, TRIGGER, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON nazwabazy.* TO user@`%` Require SSL;

jeśli user ma mieć mozliwość połączenia tylko z localhosta to zamiast user@`%`  wpisujemy  user@localhost

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.