Farjo

  • "a valuable asset to the community"
  • Posts: 492
Database permissions
« on January 23rd, 2014, 02:29 AM »
So yes the absolute path works fine and I amended the opening post.

If the wedge database user does not have permission to the smf database then the following message is given:
Sorry, the database connection information used in the specified installation of Wedge cannot access the installation of %1. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: 'SELECT command denied to user 'wedgeuser'@'localhost' for table 'smf_members'


Obviously the importer works if the SELECT premission is given to the wedge user on the smf database.

havok

  • Posts: 29
Re: Database permissions
« Reply #1, on January 24th, 2014, 11:05 AM »Last edited on February 2nd, 2014, 12:48 PM by Nao
I get  error
Unknown column 'override_theme' in 'field list

cannot import boards'
Re: Database permissions
« Reply #2, on January 27th, 2014, 02:34 PM »Last edited on January 27th, 2014, 02:41 PM
i am getting this error
SELECT
id_board, id_cat, child_level, id_parent, board_order, id_last_msg, id_msg_updated, member_groups,
id_profile, name, description, num_topics, num_posts, count_posts,
override_theme AS override_skin, unapproved_posts, unapproved_topics, redirect, id_board AS url

caused this error
    Unknown column 'override_theme' in 'field list'

Nao

  • Dadman with a boy
  • Posts: 16,013
Re: Database permissions
« Reply #3, on January 27th, 2014, 04:16 PM »
Are you sure you entered the right paths..? Because to me, it sounds like you tried to import a Wedge forum into another Wedge forum. (Or worse, into a SMF forum... :P)

TE

  • Posts: 286
Re: Database permissions
« Reply #4, on January 27th, 2014, 05:39 PM »
Quote from Nao on January 27th, 2014, 04:16 PM
Are you sure you entered the right paths..? Because to me, it sounds like you tried to import a Wedge forum into another Wedge forum. (Or worse, into a SMF forum... :P)
Yep, that's what I think, too.. the path to SMF seems wrong.
Thorsten "TE" Eurich - Former SMF Developer & Converters Guru

havok

  • Posts: 29
Re: Database permissions
« Reply #5, on January 27th, 2014, 08:35 PM »
Quote from Nao on January 27th, 2014, 04:16 PM
Are you sure you entered the right paths..? Because to me, it sounds like you tried to import a Wedge forum into another Wedge forum. (Or worse, into a SMF forum... :P)
yeah,  i had not changed the path that was automatically filled in by the importer. now the smf database wont allow access to wedge. i think its my settings on godaddy, but the admin panel has no option to change the priviledges.

error msg
The error MySQL gave was: 'SELECT command denied to user ,,, on table smf_members


Nao

  • Dadman with a boy
  • Posts: 16,013
Re: Database permissions
« Reply #6, on January 27th, 2014, 11:26 PM »
That's the problem that was discussed; apparently, the importer doesn't try to 'impersonate' each database setting. You can fix it by giving your Wedge database user, some extra rights on the SMF database.

Thorsten, what do you think should be done about this..?

TE

  • Posts: 286
Re: Database permissions
« Reply #7, on January 28th, 2014, 07:42 AM »
Quote from Nao on January 27th, 2014, 11:26 PM
Thorsten, what do you think should be done about this..?
Mhh, it's a bit complicated..

The SMF importer could read Settings.php from the SMF install in order to select the proper database Name and credetials (username and Password for the MySQL database) but other vendors (phpBB, MyBB, vBulletin etc.) don't have their own Settings.php. They have equivalents, but the credentials are sometimes stored in an Array, sometimes in a CONSTANT,  sometimes in private class vars etc.,..so it's not suitable to grab these from the related files.

An option would be to ask for credentials and store these in a php session var or in a Cookie. Not sure if it's worth the amount of work and the "Trouble" regarding security... I'm not a big fan of storing the cleartext-version of MySQL Password in a Cookie or a session var.

See it as a system requirement: The importer is running in Wedge's database context and the Wedge installation needs read-access from the other system's database in order to import the old data.

Farjo

  • "a valuable asset to the community"
  • Posts: 492
Re: Database permissions
« Reply #8, on January 28th, 2014, 12:27 PM »
How about some text next to the database user input box stating that this user requires the Select permission on the SMFdatabase? Or another pair of input boxes for SMF db user & password?

Nao

  • Dadman with a boy
  • Posts: 16,013
Re: Database permissions
« Reply #9, on January 28th, 2014, 01:19 PM »
@TE, while I'm happy that the importer is smart enough to import from other systems, I think realistically we can assume that most Wedge users will be coming from a SMF background, at least until it gets popular enough to stand as an unmissable forum package.
For that reason, it might be best to go the extra length for SMF users.

Also, I thought that since the import script has access to the source's Settings.php, it could very easily re-use this file's user name & password when connecting to the source database..?

@Farjo, I think that what bothers Thorsten is the fact that these db user & password would be stored in a clear text file. However, it could just as well be stored in $_SESSION. I'm not exactly sure why it's a problem at all. The importer has little chance of compromising your website anyway.

MultiformeIngegno

  • Posts: 1,337
Re: Database permissions
« Reply #10, on January 29th, 2014, 09:25 PM »
So, I have SMF installed in the same VPS of Wedge. They are on 2 different databases run by (respectively) say smfuser and wedgeuser (same mysql server).
Both smfuser and wedgeuser have GRANT ALL privileges on their respective databases (say smfdb and wedgedb).

To be sure Wedge Importer had the right permissions to access the SMF database I run:
Code: [Select]
GRANT ALL PRIVILEGES ON smfdb.* To 'wedgeuser'@'localhost' IDENTIFIED BY 'wedgeuserPASSWORD';

I still get this..:
Quote
Sorry, the database connection information used in the specified installation of Wedge cannot access the installation of %1. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: 'SELECT command denied to user 'wedgeuser'@'localhost' for table 'smf_members'
Posted: January 29th, 2014, 09:20 PM

Updated the post to be more clear.. reload page :P

Nao

  • Dadman with a boy
  • Posts: 16,013
Re: Database permissions
« Reply #11, on January 29th, 2014, 10:10 PM »
If anyone's waiting for my feedback -- I'm really bad at MySQL. I can use it, but the intricacies like granting privileges..? I have no frigging idea how to debug that. I'll leave it up to Thorsten to share his opinion, or anyone who's better than me at MySQL anyway.
Sorry about that.

Have you tried googling it?

Farjo

  • "a valuable asset to the community"
  • Posts: 492
Re: Database permissions
« Reply #12, on January 29th, 2014, 10:41 PM »
This is the command that phpMyAdmin runs on my database:
Code: [Select]
GRANT SELECT ON `smfdb`.* TO 'wedgeuser'@'localhost';
Other than the ` characters there doesn't seem to be any difference. :hmm:

You only need SELECT - indeed I'd argue that to give anything more risks the assurance that the converter will not alter your SMF database :^^;:

What's the command to show a user's permissions?

Harz-FEAR

  • Posts: 12

Pandos

  • Living on the edge of Wedge
  • Posts: 635
Re: Database permissions
« Reply #14, on January 29th, 2014, 11:57 PM »Last edited on January 30th, 2014, 12:13 AM
Quote from MultiformeIngegno on January 29th, 2014, 09:25 PM
So, I have SMF installed in the same VPS of Wedge. They are on 2 different databases run by (respectively) say smfuser and wedgeuser (same mysql server).
Both smfuser and wedgeuser have GRANT ALL privileges on their respective databases (say smfdb and wedgedb).

To be sure Wedge Importer had the right permissions to access the SMF database I run:
Code: [Select]
GRANT ALL PRIVILEGES ON smfdb.* To 'wedgeuser'@'localhost' IDENTIFIED BY 'wedgeuserPASSWORD';

I still get this..:
Quote
Sorry, the database connection information used in the specified installation of Wedge cannot access the installation of %1. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: 'SELECT command denied to user 'wedgeuser'@'localhost' for table 'smf_members'
Posted: January 29th, 2014, 09:20 PM

Updated the post to be more clear.. reload page :P
Did you do the following?:
Code: [Select]
flush privileges;
Please run the following statement and post the output:
Code: [Select]
select host, user from user;
# dpkg-reconfigure brain
error: brain is not installed or configured