ÓÃmysql×÷openldapµÄºǫ́Êý¾Ý¿â
etting up OpenLDAP with MySQL backend
ÓÃmysql×÷ºǫ́Êý¾Ý¿â°²×°openldap
author: TBONIUS
OpenLDAP is an X.500 Lightweight Directory Access Server used for
centralized authentication and directory lookups. This article covers configuring this service to utilize SQL services in order to store its data object. Having these objects stored in a SQL database allow for third party applications access to manage these objects.
openldapÊÇÒ»¸ö»ùÓÚx.500ÐÒéÓÃÀ´¼¯ÖÐÈÏÖ¤ºÍĿ¼ËÑË÷µÄ¼¶Ä¿Â¼·ÃÎÊ·þÎñÆ÷¡£ÕâÆªÎÄÕ°üº¬µÄÄÚÈÝÊÇ£ºÀûÓÃsql·þÎñÀ´ÅäÖÃÕâ¸ö·þÎñ
Æ÷ £¬ÓÃÀ´±£´æ¶ÔÏóºÍÊý¾Ý¡£ÔÊÐíµÚÈý·½Ó¦Ó÷ÃÎÊ¡¢¹ÜÀíÕâЩ±£´æÔÚSQLÊý¾Ý¿âÀïµÄ¶ÔÏó¡£
Ports that are needed:
ÐèÒªµÄportsÓУº
MySQL 4.x server : /usr/ports/databases/mysql41-server
MySQL 4.x client : /usr/ports/databases/mysql41-client
LibIODBC 3.x : /usr/ports/databases/libiodbc
MyODBC 3.x : /usr/ports/databases/myodbc
OpenLDAP 2.x : /usr/ports/databases/openldap21-server WITH_ODBC="YES"
Configuring the MySQL server
ÅäÖÃmysql·þÎñÆ÷
OpenLDAP has the option to use many different kinds of databases, in this case we will use MySQL. The first step in setting this up is to create a MySQL database for which OpenLDAP will use.
openldap¿ÉÑ¡ºÜ¶à²»Í¬ÖÖÀàµÄÊý¾Ý¿â¡£ÔÚÕâÖÖÇé¿öÏ£¬ÎÒ½«Ê¹ÓÃmysql¡£ÒªÍê³ÉÕâ¸öÈÎÎñµÄµÚÒ»²½Êǽ¨Á¢Ò»¸öopenldap½«ÒªÊ¹ÓõÄ
mysqlÊý¾Ý¿â
root@host # mysqladmin create ldap
Next we will create a MySQL accou
Ïà¹ØÎĵµ£º
ÏÈ×¼±¸ºÃÈí¼þ£º
·Ö±ðÔÚApache¹Ù·½¡¢php¹Ù·½¡¢mysql¹Ù·½ÏÂÔØ×îлòÎȶ¨°æ±¾
Ò»¡¢°²×°Apache£¬ÅäÖóɹ¦Ò»¸öÆÕÍ¨ÍøÕ¾·þÎñÆ÷
ÔËÐÐÏÂÔØºÃµÄ“apache_2.0.55-win32-x86-no_ssl.msi”£¬³öÏÖÈçϽçÃæ£º
³öÏÖApache HTTP Server 2.0.55µÄ°²×°Ïòµ¼½çÃæ£¬µã“Next”¼ÌÐø
È·È ......
1.Í£µômysqld
service mysqld stop
2.ÖØÆômysqld£¬Ö¸¶¨²ÎÊý
service mysqld start --skip-networking --skip-grant-tables
»òÕß
/opt/mysql/bin/mysqld_safe --skip-networking --skip-grant-tables &
/opt/mysql/ÊÇÎÒµÄMYSQL°²×°Â·¾¶
skip-grant-tables:Á¬½ÓÊ±Ìø¹ýÊ ......
Ê×Òª²½Öè(Ò»°ã¿ÉÊ¡ÂÔ):
¿ªÆômysql·þÎñ(ĬÈÏÊÇ¿ª»úʱ¾Í×Ô¶¯ÔËÐÐÁË):
¿ØÖÆÃæ°å
-->¹ÜÀí¹¤¾ß-->·þÎñ,ÔÚÀïÃæÕÒµ½Ãû³ÆÎªmysqlµÄÏî,Ë«»÷¾Í¿É¿´ËüµÄ·þÎñ״̬ÊÇÆô¶¯»¹ÊÇÍ£Ö¹,°ÑËüÉèΪÆô¶¯
Á¬½Ómysql:
ÔÚÃüÁîÐÐÏÂÊäÈë mysql -h
localhost -u root -p»Ø³µ,È»ºóÊäÈëÃÜÂë¼´¿É;»òÖ±½ÓÔËÐÐmysql×Ô´øµÄÁ¬½Ó¹¤¾ß,È»ºóÊäÈëÃÜÂë¼ ......
MysqlÖеÄÊÂÎñ¿ÉÒÔÔËÐÐÔÚÏÂÃæ4¸öisolation levelÖУ¬Ó°Ïì×Åselect²Ù×÷µÄ½á¹û£º
1. Read Uncommitted
ÊÂÎñ¿ÉÒÔ¶Áµ½ÆäËûÊÂÎñûÓÐÌá½»µÄÄÚÈÝ
2. Read Committed
ÊÂÎñ¿ÉÒÔ¶Áµ½ÆäËûÊÂÎñÒѾÌá½»µÄÄÚÈÝ
3. Repeatable Read
InnoDBµÄĬÈÏlevel£¬¿ÉÒÔÈ·±££¬ÔÚÊÂÎñÖÐÿ´ÎÖ´ÐеĶÁ²Ù×÷·µ»ØµÄ½á¹û¶¼ÓëµÚÒ»´ÎʱµÄÒ»ÖÂ
4. Seriali ......