From kevinp at polarlava.com Tue Aug 2 10:04:56 2005 From: kevinp at polarlava.com (Kevin L. Papendick) Date: Tue Aug 2 10:04:58 2005 Subject: [PolarBlog] Installation issues; mysql setup.. In-Reply-To: <200507301508.15815.micael.beronius@telia.com> References: <200507301221.54204.micael.beronius@telia.com> <20050730081646.zrozwr3s8t7kkccw@nj1.fxsonet.com> <200507301508.15815.micael.beronius@telia.com> Message-ID: <20050802100456.9et6vbdqojk0gcg8@nj1.fxsonet.com> Micael, Glad to hear you got this working. Let me know if you need anything else. You are correct in that you don't need "ALL" access for PB once things are setup and installed. You only need SELECT, INSERT, UPDATE and DELETE. By configuring your mysql user as such it prevents any possibility that someone could DROP a table or DB on your system. I don't know of any such exploits in my code and it is written such to prevent SQL injections attack where this sort of thing is possible. -klp Quoting Micael Beronius : > > Thanks, > > It turned out to be username access problems in mysql. > > here's what I did; (might help somebody else @ my newbie mysql level) ;-) > > $ mysqladmin create polardb > > $ mysql -u root > mysql> grant all on polardb.* to polaruser@"%" identified by "polarpasswd"; > mysql> flush privileges; > > .. where polardb, polaruser, polarpasswd should be exactly what where > specified in the polarblog config file. Avoid underscore '_' as it seams to > be wild cards in mysql. (that's where I went wrong in the first place, I > think). > > I seem to remember having read somewhere that 'all' isn't necessary for > 'polaruser' but atleast this got me going. ;-) > > > Regards, > - Micael > > On Saturday 30 July 2005 14.16, Kevin L. Papendick wrote: >> Hi Micael, >> >> The error message you are getting indicates that your connection to your >> database has failed. Basically "supplied argument is not a valid >> MySQL-Link resource" means the link to the database was not properly >> established. >> >> Assuming the very basics that you didn't have typo when you created the >> db user >> and what you've configured in PB matches that, I'm guessing you've fallen >> victim to what I now can the "Gentoo Syndrome". I don't know anything >> about this distribution, but I know several users have had problems with >> it. The good news is that my friend and fellow PB user Alan has figured >> this mystery out! Read this from the archives and see if it helps you out: >> http://www.polarlava.com/pipermail/polarblog_polarlava.com/2005-May/000051. >> html >> >> I also want to congratulate you on writing a very detailed and complete >> message. >> Too often people looking for help --be it on PB or something else, >> simply send >> a "I got this error why doesn't it work" sort of message. :) >> >> Let me know if this works for you or not. If not we'll work through it >> some more. If it doesn't work, I'll send you a test/debug file. >> >> Regards, >> >> Kevin L. Papendick >> >> Quoting Micael Beronius : >> > Hello, >> > >> > >> > I'm in the middle of trying to set-up polarblog on my server. >> > >> > But I'm having problem with the mysql set-up, which is not surprising at >> > all, since I know very little about how it (mysql) works. >> > >> > >> > I have got it all to install, I have edited the config.php with these >> > settings >> > >> > define('DB_HOST', 'localhost'); >> > define('DB_NAME', 'polarblog_sql'); >> > define('DB_USER', 'polarblog__user'); >> > define('DB_PASSWD', 'polarblog__password'); >> > >> > The rest is as default for now. >> > >> > I have created a database with mysqladmin, named polarblog_sql. >> > I have added rigths for polarblog__user with polarblog__password on >> > polarblog_sql with the following line; >> > grant all on polarblog_sql.* to "polarblog__user" identified by >> > "polarblog__password"; >> > flush privileges; >> > >> > Mysql is running on the same box as apache2 and where polarlava is >> > installed. >> > >> > When I tries to access this box from a box with X i point may browswer >> > to; http://10.1.200.10/polarblog/install.php >> > >> > I get two error rows on top of the page which says; >> > Warning: mysql_error(): supplied argument is not a valid MySQL-Link >> > resource in /var/www/localhost/htdocs/polarblog/lib/MySqlDb_class.php >> > on line 489 >> > Warning: mysql_error(): supplied argument is not a valid MySQL-Link >> > resource in /var/www/localhost/htdocs/polarblog/lib/MySqlDb_class.php >> > on line 489 >> > >> > Below, I get the correct page, butI have not continued the >> > installation from there. >> > >> > I have; >> > polarblog 1.52 >> > python 2.3.5 >> > mysql 4.0.24 >> > apatche 2.0.54-r8 >> > running on amd64, 64 bit Gentoo. >> > >> > >> > >> > Thanks, >> > - Micael >> > >> > _______________________________________________ >> > Polarblog mailing list >> > Polarblog@polarlava.com >> > http://mail.polarlava.com/mailman/listinfo/polarblog_polarlava.com > > _______________________________________________ > Polarblog mailing list > Polarblog@polarlava.com > http://mail.polarlava.com/mailman/listinfo/polarblog_polarlava.com > -- Kevin L. Papendick www.polarlava.com