Webboard: MySQL connection issues
[email protected] 18 Jan 2012 13:58:23 -0000
| Newsgroups | gmane.comp.web.mnogosearch.general |
|---|---|
| Message-ID | <[email protected]> |
Author: Alexander Barkov Email: [email protected] Message: Hi all, > Hello all. > I'm trying to set up mnogosearch for the first time and running into some annoying issues with mysql connections. I am required to use a remote MySQL server via stunnel, and some things work, but indexing doesn't. > > from my config: > DBAddr mysql://mnogosearch:[email protected]:3307/mnogosearch/ > > I have to use 127.0.0.1 instead of localhost because mysql tries to use socket connection otherwise, even if i specify a port. I've tried localhost too and it doesn't work either. Stunnel is listening on port 3307, and passes the encrypted connection to the remote mysql server. > > When I run the command above with localhost, I get this: > [user@server ~]$ /usr/bin/indexer -v5 > Log has not been opened > DB err: MySQL driver: #2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) - /etc/mnogosearch/indexer.conf:996: > > When I run it as above, with 127.0.0.1, I get this error: > [user@server ~]$ /usr/bin/indexer -v5 > Log has not been opened > DB err: MySQL driver: #1044: Access denied for user 'mnogosearch'@'%' to database 'mnogosearch' - /etc/mnogosearch/indexer.conf:996: > Most likely something is wrong with privileges on the remote MySQL server. What happens if you run: mysql --host=127.0.0.1 --port=3306 > So if I don't use localhost, mnogogsearch tries to connect with a wildcard hostname instead of localhost (which our DBAs are not going to allow). The funny thing is, running the indexer table creation does work: > [user@server ~]$ indexer -Ecreate > (lots of SQL info removed) > 15 queries sent, 15 succeeded, 0 failed Crawling and table creation (and all other indexer commands) use exactly the same connection procedures. Can you please run these commands: indexer -Edrop indexer -Ecreate indexer -S indexer -n1 and post the entire output. > > worst case, I may be allowed to install mysql locally on the server but it's technically against our policy to have a db server on a front-end production machine. > > I am running mnogosearch 3.3.11 from the rpmforge repository on CentOS 5.7. Is this something that can be fixed by going to 3.3.12, or is it a bug? I'd appreciate any assistance I can get! > > PS: I also discovered that the DBAddr line doesn't like passwords with at-signs (@) in them... > You need to escape the AT sign using %40. Please have a look into this manual section: "Special characters in user and password" http://www.mnogosearch.org/doc33/msearch-cmdref-dbaddr.html#AEN8502 Reply: <http://www.mnogosearch.org/board/message.php?id=21387>