Opened 15 years ago
Closed 15 years ago
#10042 closed defect (duplicate)
Impossible to specify a MySQL connection socket
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | database backend | Version: | |
| Severity: | normal | Keywords: | mysql socket trac-admin | 
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
It is possible that the local MySQL installation has networking disabled and located in a special path, so it is not reachable by Trac through the usual means.
Looking at the code on "trac/db/mysql_backend.py", you are using MySQLdb.connect to create a connection to the database, and this library permits to specify a socket instead of a host (unix_socket parameter).
SQLAlchemy for example permits the following DSN syntax:
mysql://root@localhost/db?unix_socket=/usr/local/mysql/mysql-5.5/data/mysql.sock
Expected behaviour: Users should be able to specify a MySQL socket instead of MySQL host when creating a new Trac installation with "trac-admin".
System Information: RHEL 5.3, Python 2.7, MySQL 5.1, Trac-0.12.3dev_r10578 (downloaded from SVN branch 0.12-stable)



  
Already implemented in #5120, to be released in 0.13.