Topic on Project:Support desk

Database query error and error 1142 on my second wiki

9
Newman2 (talkcontribs)

Hello guys. I have been working on a wiki family, and the second wiki that I created had problems with having its own database. After I granted permissions to my second database's user, my select permission was denied. Any way to fix this? I tried running cd maintenance on PuTTY, and it said that there was no such file or directory. This is how the error looks:

[W702Vu0kj5bBYBU1eCUslwAAARU] /mw19/ Wikimedia\Rdbms\DBQueryError from line 1149 of /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount FROM `gjlxrtap_mw19758`.`mwd50q_user` WHERE user_id = '1' LIMIT 1

Function: User::loadFromDatabase

Error: 1142 SELECT command denied to user 'gjlxrtap_mw34555'@'localhost' for table 'mwd50q_user' (localhost)

2001:16B8:1028:C100:B8D7:1BAF:F797:54C7 (talkcontribs)

You need to change the MySQL configuration: User gjlxrtap_mw34555 needs to have access to table mwd50q_user.

Newman2 (talkcontribs)

How can I enable access to mwd50q_user?

Bawolff (talkcontribs)

his is normally setup by the MediaWiki installer. If you need to do it manually, see mariadb docs:

https://mariadb.com/kb/en/library/grant/

Probably, you will want to issue the SQL command:

GRANT ALL PRIVILEGES ON gjlxrtap_mw19758.* TO 'gjlxrtap_mw34555'@'localhost'
Newman2 (talkcontribs)

I ran the command on SQL, and MySQL gave the following error: #1044 - Access denied for user 'cpses_gjvh8z8op6'@'localhost' to database 'gjlxrtap_mw19758'

Bawolff (talkcontribs)

You need to run it as a user that has the permission to grant access to things.

If its your own db, often that's the "root" user. If your db is managed by your hosting provider, contact your hosting provider.

Newman2 (talkcontribs)

Yes, the database I am working with is my own database. However, I created it by copying the structure and data from the main wiki's database. How can I get permission to grant access?

88.130.53.62 (talkcontribs)

Log in to MySQL with the MySQL root user! This user can execute GRANT queries.

Newman2 (talkcontribs)

I have been told by the Webhostface staff that I already granted all the permissions. If I already granted permissions, then what do I do next?

Reply to "Database query error and error 1142 on my second wiki"