Webboard: MySQL connection issues

[email protected] 18 Jan 2012 18:43:44 -0000
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <[email protected]>
Author: Alexander Barkov
Email: [email protected]
Message:
<skip>

> indexer does need DROP permissions and some other permissions.

> I'm quite sure the problem is in too strict permissions.

> 

> To make this sure, you'll need to activate MySQL query log

> on the remote server and see which SQL query causes the problem.

> 

> Another options is to install debug version of mnoGoSearch

> and add "DebugSQL=yes" parameter to DBAddr.



This is how a typical DebugSQL output looks like.

Notice "DROP TABLE":



[24652] 0.01 SQL {sql.c:941}: SELECT rec_id,url,tag,category,command,weight,ordre,parent,enabled FROM server WHERE rec_id=256178970

[24652] 0.00 SQL {sql-mysql.c:540}: LOCK TABLE server WRITE, srvinfo WRITE

[24652] 0.00 SQLLockOrBegin(server WRITE, srvinfo WRITE) {sql.c:893}

[24652] 0.00 SQL {sql.c:894}: INSERT INTO server (rec_id, enabled, tag, category, command, parent, ordre, weight, url, pop_weight)  VALUES (256178970, 1, '', 0, 'S', 0, 113, 1.000000, 'http://www.mnogosearch.org/doc33/', 0)

[24652] 0.00 SQL {sql.c:863}: DELETE FROM srvinfo WHERE srv_id=256178970

[24652] 0.00 SQL {sql-mysql.c:547}: UNLOCK TABLES

[24652] 0.00 SQLUnlockOrCommit {sql.c:896}

indexer[24652]: indexer from mnogosearch-3.3.12-mysql-pqsql-unixODBC-ibase-freetds-sqlite3-oracle8i started with './indexer.conf'

[24652] 0.00 SQL {sql.c:2093}: INSERT INTO url (url,referrer,hops,crc32,next_index_time,status,seed,bad_since_time,site_id,server_id,docsize,last_mod_time,shows,pop_rank) VALUES ('http://www.mnogosearch.org/doc33/',0,0,0,1326911804,0,26,1326911804,256178970,256178970,0,0,0,0.0)

[24652] 0.00 SQL {sqldbms.c:134}: DROP TABLE IF EXISTS udm_url_tmp

[24652] 0.03 SQL {sql.c:2985}: CREATE TEMPORARY TABLE udm_url_tmp (rec_id int not null)

[24652] 0.00 SQL {sql.c:2987}: LOCK TABLES udm_url_tmp WRITE, url WRITE, urlinfo AS it WRITE, urlinfo AS il WRITE, server AS s WRITE, categories AS c WRITE

[24652] 0.02 SQL {sql.c:2988}: INSERT INTO udm_url_tmp SELECT url.rec_id FROM url WHERE next_index_time<=1326911804  ORDER BY seed LIMIT 1

[24652] 0.00 SQL {sql.c:3026}: SELECT url.url,url.rec_id,docsize,status,hops,crc32,last_mod_time,seed FROM url, udm_url_tmp WHERE url.rec_id=udm_url_tmp.rec_id

[24652] 0.00 SQL {sql.c:3094}: UPDATE url SET next_index_time=1326926204 WHERE rec_id in (1)

[24652] 0.00 SQL {sql.c:3126}: UNLOCK TABLES

indexer[24652]: [24652]{01} URL: http://www.mnogosearch.org/doc33/

[24652] 0.00 SQL {sql.c:1068}: SELECT rec_id FROM server WHERE command='S' AND url='http://www.mnogosearch.org/'

[24652] 0.00 SQL {sql.c:1086}: SELECT rec_id, url FROM server WHERE rec_id=-1888075424

[24652] 0.00 SQL {sql.c:1096}: SELECT enabled,tag,category,ordre FROM server WHERE rec_id=256178970

[24652] 0.00 SQL {sql.c:1118}: INSERT INTO server (rec_id, enabled, tag, category, command, parent, ordre, weight, url) VALUES (-1888075424, 1, '', 0, 'S', 256178970, 113, 1.000000, 'http://www.mnogosearch.org/')

indexer[24652]: [24652]{01} ROBOTS: http://www.mnogosearch.org/robots.txt

[24652] 0.00 SQL {sql.c:2093}: INSERT INTO url (url,referrer,hops,crc32,next_index_time,status,seed,bad_since_time,site_id,server_id,docsize,last_mod_time,shows,pop_rank) VALUES ('http://www.mnogosearch.org/doc33/msearch-authors.html',1,1,0,1326911804,0,36,1326911804,0,256178970,0,0,0,0.0)





> 

<skip>

> > [user@server ~]$ indexer -n1

> > Log has not been opened

> > DB err: MySQL driver: #1044: Access denied for user 'mnogosearch'@'%' to database 'mnogosearch' - /etc/mnogosearch/indexer.conf:996: 

> > 



Btw, what do you have on the line 996 ?





> > Now, by command line mysql i can use -h localhost IF I also specify --protocol=tcp.  I can't seem to specify that in the DBAddr config.  

> > 

> > Also, thanks for the hint on escaping the password.

> 

Reply: <http://www.mnogosearch.org/board/message.php?id=21393>