News:

Wondering if this will always be free?  See why free is better.

Main Menu

SELECT command denied

Started by endurics, April 19, 2008, 10:14:53 PM

Previous topic - Next topic

endurics

Greetings all,

I'm getting this error when running convert.php:

SELECT command denied to user 'smf_user'@'localhost' for table 'forum_members'

I am using what I believe to be the latest convert.php and .sql scripts (I have attached both here).

I have a fresh install of SMF 1.1.4 and the source tables with a prefix of forum_ are located in the same SMF db.  And yes, I modified convert.php to recognize the forum_ prefix.

Thanks for the help!
Boardnation - Since 2001, Free & Advanced Message Board Hosting Services

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

endurics

Hi SleePy,

That post gives this info:

QuoteInfo: The cause of this error is that SMF and Software X are in separate databases and the SMF database user does not have access to Software X's database.
Fix: If your host has cPanel you can add the SMF database user to Software X's database.  If your host does not have cPanel what you can do is reinstall SMF in the same database as Software X.

Which is great, but my source yabb se tables are in the same db as the SMF tables, so my db user should have access to all the tables... hmmm, but maybe not?  Is there some way I can confirm this in phpmyadmin?
Boardnation - Since 2001, Free & Advanced Message Board Hosting Services

SleePy

Can you access the forum_members table while logged in as the smf_user?

Remember that mysql users can be granted access to specific tables only.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

endurics

QuoteCan you access the forum_members table while logged in as the smf_user?

Remember that mysql users can be granted access to specific tables only.

OK, I'm back at this task.  Boy, do I get sidetracked easily  :)

I did login to MySQL as the smf_user, and I was able to do a select * from forum_members; it came back with xxxx rows for the results.

So I am still stymied here.
Boardnation - Since 2001, Free & Advanced Message Board Hosting Services

SleePy

I meant to the yabbse database.

If you are using a more recent version of Yabbse, you should be able to just use the large upgrade files and perform a large upgrade rather than a conversion since SMF did come from yabbse :)
* SleePy needs to remember that at the start, I forget it myself sometimes..
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

endurics

QuoteI meant to the yabbse database.

If you are using a more recent version of Yabbse, you should be able to just use the large upgrade files and perform a large upgrade rather than a conversion since SMF did come from yabbse :)

Well actually SleePy, both sets of tables are in the same db (both the yabbse and the fresh install of smf 1.1.4).

And I don't really have a yabbse install to upgrade, all I have at this point is the data. So now I am looking thru the convert.php code to see exactly what line of code is generating this error message.
Boardnation - Since 2001, Free & Advanced Message Board Hosting Services

Oldiesmann

SMF doesn't need the YaBB SE files to upgrade... All you'll need is a Settings.php from YaBB SE. SMF will be able to upgrade your existing data from there.
Michael Eshom
Christian Metal Fans

endurics

QuoteAll you'll need is a Settings.php from YaBB SE.

OK thanks, so I could go that route if this refuses to work, but I was curious as to the cause of this permissions problem.

If you could point me to the line(s) of code in convert.php that would be generating this error, I'd like to investigate this a bit further before giving up on the converter.

The error occurs immediately, so it's likely one of the first SELECT's being done.
Boardnation - Since 2001, Free & Advanced Message Board Hosting Services

SleePy

There is no line really that is causing it.
The converter is attempting to select something and being denied permission.

When the converter is started. It creates a connection to your database via the settings it has in the SMF Settings.php.
It then looks at the other forum system configuration file for its database name (via the .sql script that tells it where and what it is).
It then uses that information while converting.

The error you get means that the SMF mysql user does not have access to the Yabbse database.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

endurics

QuoteThere is no line really that is causing it.
The converter is attempting to select something and being denied permission.

OK SleePy, now I get it.  Duh!

Two settings.php files are required, even in my situation, because when the source and destination tables are in the same db, they must have a different prefix.  Double duh!

So, I created the destination settings.php and it worked absolutely flawlessly.  Well, I guess that's what I get for staring into my monitor for hours on end without food or drink ;)
Boardnation - Since 2001, Free & Advanced Message Board Hosting Services

Advertisement: