[00:27:54] inductiveload: as in, don't need to create the database according to the instructions at https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#MariaDB/MySQL [00:27:58] ? [00:28:56] >If doing so from MediaWiki is impossible [00:31:27] ah right [00:32:07] Well, guess I'll delete the database then and start the config process again. I probably just miswrote the password [00:32:29] wait, but that wouldn't explain the error I'm getting [00:32:40] Cannot access the database: :real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'. [00:32:54] [00:12:43] Sounds like your grants might not be correct [00:33:13] How could I make sure? [00:33:45] look what you created [00:33:52] try it from cli mysql [00:35:34] well even opening the mariadb cli requires root password [00:35:52] so how would I be able to allow mediawiki to access it? [00:37:38] is mysql/mariadb on the same host as the webserver? [00:38:03] yes, it is [00:38:19] Do you know the root password? [00:38:21] just checked mariadb and I do have a database there titled wikidb [00:38:25] and yup, I do [00:38:44] so during the installer, you should just give it the root credentials for it to be able to create the database/user/creds [00:38:59] see, I've tried that - that's the thing [00:39:48] have you tried 127.0.0.1 instead of localhost for the hostname? [00:40:08] yeah [00:40:13] none of it works [00:40:19] I'm stumped [00:40:55] I'm using root for the database username field [00:41:17] and wikidb for the database name field [00:48:04] it might be a permissions issue as you say Reedy: Any idea how I could solve it if it is? [00:48:41] mysql grants and permissions can be awkward due to the things like root being different to root@% [00:49:42] root@%? [00:50:43] @% means at any hostname/ip (mysql wildcard [00:50:53] but you could have your grants root@localhost etc [00:55:11] https://dev.mysql.com/doc/refman/8.0/en/grant.html [01:01:47] thanks, I'll give this a read. I just don't know why this would be a problem. I just installed mariadb as default and only ran the commands as shown in the mediawiki link I shared. I didn't have problems like this when i tried installing mediawiki a year ago [01:03:47] It'll be some non obvious typo [01:04:07] If you've not got anything in that mariadb install, it might be easier to purge the db install and start again [01:05:51] yeah, you're right [01:05:55] I'll try that first [01:07:31] wtf [01:07:51] sudo apt-get remove mariadb = unable to locate package mariadb [01:08:04] yet if i run "mariadb", it opens up mariadb [01:08:21] >_> [01:13:28] god I hate ubuntu [01:13:35] slackware just works [01:15:49] it'll be mariadb-server [01:16:48] was just about to type that I realised that just now lol [01:17:00] sleep deprivation is one hell of a drug [01:17:40] dpkg -l | grep maria [01:21:12] reinstalled mariadb and it still isn't working [01:21:23] Cannot access the database: :real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'. [01:21:32] -_- [01:21:43] the literal root password somehow isn't good enough [01:23:46] What if you use 127.0.0.1 instead of localhost? [01:24:09] nope [01:24:13] that didn't work either [01:24:18] exactly the same error [01:24:35] mysql -u root -h localhost -p [01:24:40] and then entering the password works? [01:27:29] hm, no that doesn't work [01:28:00] I've been accessing my database by entering "mariadb" and going from there, though I do have to use sudo to do it [01:28:15] wait, hang on. I forgot to use sudo for the mysql command [01:28:46] nvm, it just asks me for the password twice [01:28:57] it'll ask for the sudo password, then the mysql password [01:29:09] yeah [01:29:10] oh [01:29:11] okay [01:29:25] so, it asked me for the sudo password, but then it asked me for the mysql pass [01:29:36] except I just hit enter when it asked me for the mysql pass [01:29:46] and it let me access mariadb anyway? [01:30:52] root is special [01:31:08] >Apparently the mysql-server installation on 16.04 (or any 5.7 installation?) allows root access not through password, but through the auth_socket plugin. [01:31:30] I'm running ubuntu 18.04 [01:31:48] yeah [01:31:53] the version numbers aren't so relevant [01:31:57] but the idea is the same [01:32:27] hm, the auth_socket plugin? None of this was a problem for the previous guy who installed mediawiki on the server a while back. Makes me wonder what's causing this. It just seems so random [01:32:55] The TLDR at this point seems to be the root password isn't potentially what you think it is [01:33:02] the mysql root password [01:33:37] true, but I don't see why that would be the case given that I never set one [01:34:19] allowing you to login as root with no password, via non socket, seems pretty insecure [01:34:23] set a root password and move on [01:35:38] I'll be happy to, but how can I set one? [01:36:03] also I know nothing about sockets [01:36:40] https://www.techrepublic.com/article/how-to-set-change-and-recover-a-mysql-root-password/ [01:38:06] for some reason, ctrl + shift + c is no longer allowing me to copy and paste from the terminal [01:39:00] nvm, found the article in question [01:39:02] thx [01:44:42] still [01:44:43] doesn't [01:44:44] work [01:44:46] :D [01:44:57] (god why) [01:45:37] and yeah, I tried alternating from 127.0.0.1 to localhost [01:47:06] and I did restart the mysql server as well [01:49:29] Cannot access the database: :real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'. [01:50:46] I changed the password and even still my own user can't access mysql with the new pass without sudo [01:51:54] I don't understand this at all [01:52:08] by all means, it *should* work [02:02:04] okay, I tried changing the password instead of setting a new one and that seemed to make some progress [02:02:11] but now I get: [02:02:12] ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") [02:05:10] wait now, that was just because mysql server was still off [02:05:35] turning it back on and entering my new password give me: (drumroll please) [02:05:52] the exact same error as before :D [02:06:17] ERROR 1698 (28000): Access denied for user 'root'@'localhost' [02:07:15] this error is going to make me paint my face white, put on a big red nose and go terrorise my city as a maniacal madman who fights someone in a bat costume I swear [04:22:39] Hello all, for some reason my mobile Wikinews is displaying in Welsh, but my desktop is not. I don't speak Welsh, I never tampered with it in any way. Very confused, and would like some help in resolving. [04:23:28] For reference, what JJLiu112 is seeing: https://ibb.co/5W80V7C [04:24:14] interesting [04:24:41] Language setting, as they told me, is set to en-GB. [04:25:53] yup, that's it [04:25:59] https://en.m.wikinews.org/wiki/Main_Page?uselang=en-gb [04:26:55] https://en.wikinews.org/wiki/MediaWiki:Mobile-frontend-logged-in-homepage-notification/en-gb [04:28:11] What the heck! [04:29:16] in general, my advice is to not use en-gb (or en-ca...) and just use en. too many weird things like this happen otherwise [04:31:14] weird. on enwiki it's correct, https://en.wikipedia.org/wiki/MediaWiki:Mobile-frontend-logged-in-homepage-notification/en-gb [04:31:26] but on mediawikiwiki it's welsh https://www.mediawiki.org/wiki/MediaWiki:Mobile-frontend-logged-in-homepage-notification/en-gb [04:32:34] we don't ship en-gb translations [04:32:41] (I have updated it on enwn, so en-gb says welcome). But an argument should be made, Welsh is in GB, and isn't technically incorrect. :P [04:33:08] yeah but cy != en [04:33:35] Hang on [04:33:36] what [04:33:57] Not tech-savvy at all, could someone translate [04:34:10] Did you fix it? [04:34:23] "Donate" is still in Welsh [04:34:56] looks like all group 0 and group 1 wikis have these weird Welsh-ish translations, but not group 2 [04:35:16] no hablo [04:35:58] JJLiu112, for some reason, the en-gb translations on some wikis are in Welsh (kinda. they don't exactly match the Welsh translations either) [04:36:12] OK, could this be fixed then? [04:36:18] It's very disorienting [04:36:27] It could be, but in the mean time, use en instead of en-gb. [04:36:39] Alright [04:38:36] let me just double-check, did this start happening within the last 9 hours, or before then? [04:38:54] oh hey there is already a task about it https://phabricator.wikimedia.org/T286679 [04:39:52] Before the [04:39:54] *then [04:40:27] I think it was about two-three days ago, couldn't be more than that [04:43:53] so it's a known issue, probably will get fixed tomorrow [04:44:56] Thanks for your help! [10:54:58] AntiComposite is it possible it is taking the locale from browser setting? [15:07:43] acagastya, unlikely unless enwikibooks has something like https://commons.wikimedia.org/wiki/MediaWiki:Gadget-AnonymousI18N.js [15:08:26] I don't remember explicitly setting mine to en-gb on wikidata, and yet hours after our discussion, I was greeted with words too foreign to me. [15:08:34] My browser, however, is set to en-GB. [15:09:26] interesting [15:11:22] acagastya: it's Welsh that it's displaying in [15:11:37] Someone selected en-gb instead of cy when translating [15:11:51] It got rolled back but some of the bad translations still landed [15:21:52] hi [15:22:06] could someone help me with connecting mediawiki to my database? [15:22:46] I'm trying to run the config script, but something seems to be wrong with my mariaDB? [15:23:09] I made a user and set a password and gave said user all perms on the database I created [15:23:18] granted all privs [15:23:43] but when i give mediawiki said user and password, it refuses to connect to the database [15:23:58] Cannot access the database: :real_connect(): (HY000/1045): Access denied for user 'db_somebody'@'localhost' [15:28:16] I'm running ubuntu version 18.04 [15:29:21] even changing the username to root doesn't work [15:43:11] this is a long show, but: note that "localhost" and "127.0.0.1" are NOT the same fort the purpose of MariaDB grants. [15:43:22] *long shot [15:44:04] Some day, I hope I learn the difference between 127.0.0.1, localhost, 0.0.0.0 and its cousins. [15:44:54] usually, localhost is 127.0.0.1. It's just that MySQL/MariaDB have special handling for it, and map it to a unix socket in the file system. [15:45:08] 0.0.0.0 is not a valid address at all... [15:45:19] 0.0.0.0 is used though [15:45:22] to mean "listen on all interfaces" [15:46:02] ah right, for listening. true. [15:46:25] it's basically "no address", which i guess in some context is taken to mean "any interface". [15:49:32] duesen_: I've tried using 127.0.0.1 as well but that just gives the same error [15:51:34] I'm still pretty sure it's a grant/password issue [15:54:15] I've created a new user and granted them all privileges on the database [15:54:39] I've removed, purged and reinstalled mariadb-server 3 times [15:55:51] I'm probably misunderstanding at least one aspect to all of this though [15:57:50] mightysands: log into mysql as root and run: SELECT user,host FROM mysql.user WHERE user = 'db_somebody'; [15:57:57] (replace db_somebody with the username you created) [15:58:14] db_somebody is the username I created [15:58:21] I'll try it [15:58:31] might be mysql.users, so do that if it says mysql.user doesn't exist [15:58:42] I can never remember :P [15:59:15] anyway once you get that run, let me know the host(s) that show up in the query output [16:00:47] it finds the user and says its host is localhost [16:02:42] ok [16:02:49] in mediawiki itself what are you specifying for the connection [16:05:49] I've tried using root, as well as db_somebody for the username with both a blank password field as well as using db_somebody's password but none of them work [16:16:45] mightysands: sorry, I meant what hostname are you giving mediawiki to use? [16:17:08] (for the database server) [16:20:42] the database host? [16:20:54] I've tried both localhost and 127.0.0.1 [16:47:22] mightysands: you would need to use localhost, 127.0.0.1 won't work given the user definition in mariadb (db_somebody@localhost and db_somebody@127.0.0.1 are two different users according to mysql/mariadb). Verify that the unix socket path in your mariadb config and the unix socket path in your php.ini both point to the same file [17:01:28] moonmoon: Thanks, At least now we know it's supposed to be localhost and not 127.0.0.1 [17:02:11] looking in /etc/mysql/ there seem to be multiple files, but I'm not sure which is the right config file [17:03:03] it lists a conf.d, debian.cnf, mariadb.cnf , mariadb.conf.dand my.cnf which is symlinked to /etc/alternatives/my.cnf [17:04:14] ah, I see it reads the mariadb.conf file first, followed by the conf.d and mariadb.conf.d files [17:08:03] okay, so looking in /etc/mysql/mariadb.conf.d/50-client.cnf lists the socket location as being /var/run/mysql/mysqld.sock [17:10:55] moonmoon: do you know where the php.ini file would be located? [17:24:04] mightysands: varies, check phpinfo() in the same environment you run mediawiki from [17:42:45] moonmoon: the ini file is located in /etc/php/8.0/cgi/ because I'm using the CGI API [17:43:56] under the Pdo_mysql section, the parameter 'pdo_mysql.default_socket=' is empty, but it says if it is empty, then it uses "the built in" [17:44:10] but I don't know what "the built-in" is [17:44:14] it doesn't say [17:45:09] the mysqli.default_socket is also empty, along with mysqli.default_host and mysqli.default_user and mysqli.default_pw [17:46:57] /var/lib/mysql/mysql.sock iirc [17:47:09] phpinfo() would tell you if you scroll down [17:47:09] I think [17:48:33] ah, you're right [17:48:43] it lists /var/run/mysqld/mysqld.sock as the socket for sqli [17:48:53] so the sockets match up [17:49:39] ok, so it's likely not a case of "you're running two independent database servers and php is connecting to the wrong one" [17:49:52] that's a step somewhere [17:49:57] with that I have no idea why using root didn't work for you [17:50:16] are you installing via the command line or the web installer? [17:50:23] web installer [17:50:26] k [17:50:59] so what happens if you put db_somebody and its password in as the regular database user, and set the root username/password as the installation user? [17:51:52] (that configuration will log in as root to create the database, create the db_somebody user if it doesn't exist, and grant db_somebody the access it needs to use the db) [17:52:05] (and normal wiki operation will make use of db_somebody) [17:52:44] much dejavu :) [17:54:22] Reedy: heh I just noticed that there was already an earlier convo about this :P [17:56:39] I don't get further than the first page on connecting to a database. It just says access denied for user@localhost [17:57:33] the fields are (excluding database table prefix) database host, database name, database username and database password [17:57:59] it literally shouldn't be this hard [17:58:01] it's going to be something simple [17:58:16] that's what I'm thinking :P [17:58:26] question is wtf is it? [17:58:38] Maybe stop trying to use root completely might be easier [17:58:48] create a user with an explicit proper grant and password [17:59:18] already tried that [17:59:20] didn't work [18:00:24] access ie just being denied to all my non-root (as in system root) users for some reason [18:00:28] access is* [18:00:48] can't access mysql without sudo [18:01:03] dumb question: did you do the grants properly? [18:02:16] I granted all privileges to db_somebody. I'm operating under the assumption that the root sql user already has all privileges granted [18:02:26] and at this point, there are no dumb questions [18:02:34] granted all privileges on *what* to db_somebody? [18:03:03] log into mysql and run SHOW GRANTS FOR db_somebody@localhost; [18:03:10] roger roger [18:04:07] granted all privs on localhost [18:04:15] can you copy/paste the exact output please? [18:04:28] (omit the table formatting, just do the line with the grant itself) [18:04:43] GRANT USAGE ON *.* TO 'db_somebody'@'localhost' IDENTIFIED BY PASSWORD '*C2476BBB73EF97D943B87C821FF380AF19A562B2' | [18:04:56] anything else? [18:05:09] also you probably want to change that password now [18:05:10] GRANT ALL PRIVILEGES ON `Murat_wiki`.* TO 'db_somebody'@'localhost' WITH GRANT OPTION [18:05:16] and yeah [18:05:30] it's a hash of the password, but I'll change it [18:05:46] hashes can be cracked with time :) [18:05:49] ik [18:06:44] anyway my recommendation would be to keep all of your identifiers all-lowercase [18:06:51] so remove that grant and grant instead to murat_wiki [18:07:21] and in your wiki install, similarly specify all-lowercase murat_wiki [18:07:27] might not be the issue but it's a good practice [18:07:34] noted [18:08:02] (if you specified all-lowercase murat_wiki in the wiki installation then that was 100% your issue since database names are case-sensitive by default on linux) [18:09:10] what I don't get is how am I supposed to know the database password if I haven't set one yet?? [18:09:20] er... you did? [18:09:22] because running that field blank doesn't even work [18:09:27] db_somebody has a password [18:09:35] it was whatever hashed to that hash you just pasted above [18:10:06] I meant if mediawiki is supposed to create it if I haven't made it beforehand [18:10:45] if it doesn't already exist and you provide superuser credentials to the installer, it will create the user with the password you specified in the installer [18:11:06] because I've tried setting up the database manually and removing/purging mariadb/reinstalling it before using the config script to create it all for me and in either scenario: it's always denied access to the database [18:11:17] however based on what Reedy mentioned earlier, passing root to the installer likely won't work as-is so you're better off making the user and granting it permissions in advance [18:11:31] also creating the database in advance [18:11:51] is db_somebody a user on the OS, or just in the db? [18:11:57] just in the db [18:12:12] or rather, it just needs to be one in the db [18:12:13] there's no reason to make an OS user for it [18:12:16] Shaun just in the db [18:12:46] just curious if this is the authentication plugins thing. ubuntu keeps defaulting to socket-based privs for me, so the OS user becomes relevant (hence sudo ..) [18:14:43] try: select user,plugin from mysql.user; if they’re using auth-socket, the OS user does matter. if they’re using mysql_native_password, the password matters [18:15:37] I'm not sure. I've tried putting the db username as root and using my system's root pass, I've tried setting it as root and using the sql pass I thought I set earlier, but in both scenarios and even with using db_somebody and using it's password and after granting it all privs in sql, it still says access denied [18:15:53] Shaun: okay, I'll tyr that. One sec [18:17:14] (I should be clear I have very little clue what I’m talking about here, I hit it on every fresh ubuntu install, and then google for something to paste in to fix it. but sudo making any difference rings a bell) [18:17:19] root user uses unix-socket but wikiuser and db_somebody don't use any plugin it looks like [18:17:50] also this means that doing apt-get remove --purge on mariadb-server was a damn lie because wikiuser shouldn't exist at all anymore [18:20:05] I’d be very tempted to try: update mysql.user set plugin=‘mysql_native_password’ where User=‘db_somebody’; … except I don’t know how to revert that if it doens’t help, so it may be safer to shove some of these nouns into google [18:22:29] so, as my standard OS user, running mysql -u db_somebody -p hits me with an access denied message, even when I use the password I set for db_somebody [18:23:43] what I don't get is why doing sudo apt-get remove --purge mariadb-server didn't...y'know...purge all my mariadb settings? [18:24:22] I imagine it doesn't delete tables/dbs on disk [18:31:23] debian used to ask about that at install-time, whether you wanted the tables removed when the package is removed. because in the vast majority of cases, that’d be a disaster. that’s the postrm bit in https://pastebin.com/eK60zrMw [18:50:34] so [18:50:37] um [18:50:49] I don't know what I did [18:50:55] but I guess 6th time's the charm? [18:51:23] I must have mistyped something somewhere every other time I tried to set the details [18:51:35] I'm so sorry for this [18:51:44] thank you all so much for your help! [18:51:51] I really appreciate it! [19:04:53] though now I'm trying to delete my user db_somebody and it keeps telling me that the drop operation failed on user db_somebody@% [19:19:27] mightysands: specify the full username, db_somebody@localhost [19:19:42] the host is considered to be part of the user [19:34:00] Is it possible to sign an unsigned (or incorrectly signed) comment by another user? [19:36:28] Some wikis use templates for that [19:53:26] got it all working in the end [19:53:33] :) [20:19:15] mightysands: what was the issue? [20:19:55] Nice! [20:19:56] Ah, 6th time was the charm