Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #229743 > unrolled thread
| Started by | Keith Christian <keith1christian@gmail.com> |
|---|---|
| First post | 2020-12-14 02:30 +0100 |
| Last post | 2020-12-14 14:10 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.debian.user
Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package Keith Christian <keith1christian@gmail.com> - 2020-12-14 02:30 +0100
Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package deloptes <deloptes@gmail.com> - 2020-12-14 10:10 +0100
Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package Joe <joe@jretrading.com> - 2020-12-14 12:30 +0100
Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package Keith Christian <keith1christian@gmail.com> - 2020-12-14 14:10 +0100
Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package Keith Christian <keith1christian@gmail.com> - 2020-12-15 17:30 +0100
Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package Keith Christian <keith1christian@gmail.com> - 2020-12-14 14:10 +0100
| From | Keith Christian <keith1christian@gmail.com> |
|---|---|
| Date | 2020-12-14 02:30 +0100 |
| Subject | Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package |
| Message-ID | <BlKQx-63S-5@gated-at.bofh.it> |
I start out with:
sudo apt -y install mediawiki
and it installs all packages including mariadb without problems.
Then, when starting to configure mediawiki with the web page, a
database has to be created along with a db user for mediawiki's use:
http://localhost/mediawiki/mw-config/index.php?page=Welcome
I left Database host as "localhost"
I set Database name as "mediawiki"
Database table prefix is left blank
User account for installation is '"root"
.....and so on.
I started Mariadb immediately after installation with:
sudo mysqld_safe --skip-grant-tables --skip-networking &
Next, I logged in with this:
mysql -u root -p
But as I remembered, (it's been awhile) one cannot create any users in
this mode due to --skip-grant-tables.
E.g. I can create these users when logging in with mysql -u root:
create user 'root'@'localhost' identified by 'foo123';
create user 'mediawiki'@'localhost' identified by 'baz123';
but I can't log in with either user after restarting MariaDB with:
sudo systemctl start mariadb
Seems I must always log in with
mysql -u root -p
There are lots of web pages mentioning this problem but none are
complete enough and my attempts have failed.
SO.....Looking for a "bulletproof" document to set up MariaDB users so
I can get on with configuring Mediawiki.
I don't want to login as a 'root'@'localhost' user for routine DB work
and would rather use the 'mediawiki'@localhost' user for that.
Thanks.
[toc] | [next] | [standalone]
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2020-12-14 10:10 +0100 |
| Subject | Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package |
| Message-ID | <BlS1H-2ez-3@gated-at.bofh.it> |
| In reply to | #229743 |
Keith Christian wrote:
> Next, I logged in with this:
> mysql -u root -p
>
> But as I remembered, (it's been awhile) one cannot create any users in
> this mode due to --skip-grant-tables.
When installed in Debian it does not have password (AFAIR). It is sufficient
to execute "mysql -u root -p" and press ENTER to log in. You then change
the password.
Regarding --skip-grant-tables I used this just last week to reset a root
password for a customer.
It seems there are two different methods depending on what version you use.
> but I can't log in with either user after restarting MariaDB with:
> sudo systemctl start mariadb
>
Could be that you have something on the network side? From which host do you
log in?
> Seems I must always log in with
> mysql -u root -p
>
This is working only on localhost
> There are lots of web pages mentioning this problem but none are
> complete enough and my attempts have failed.
>
> SO.....Looking for a "bulletproof" document to set up MariaDB users so
> I can get on with configuring Mediawiki.
>
Just try
mysql -u root -p -h localhost
> I don't want to login as a 'root'@'localhost' user for routine DB work
> and would rather use the 'mediawiki'@localhost' user for that.
So
mysql -u mediawiki -p -h localhost
is not working as well?
I use following and never had issue with that
CREATE USER 'mediawiki'@'localhost' IDENTIFIED BY 'xxxxxxxxxxx';
GRANT Select ,Insert ,Update ,Delete ,Create ,Drop , Index ,Alter ON
mediawiki.* TO 'mediawiki'@'localhost';
flush privileges;
Remember the client can access only on local host.
[toc] | [prev] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2020-12-14 12:30 +0100 |
| Subject | Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package |
| Message-ID | <BlUdc-3t2-5@gated-at.bofh.it> |
| In reply to | #229747 |
On Mon, 14 Dec 2020 10:01:15 +0100 deloptes <deloptes@gmail.com> wrote: > Keith Christian wrote: > > > Next, I logged in with this: > > mysql -u root -p > > > > But as I remembered, (it's been awhile) one cannot create any users > > in this mode due to --skip-grant-tables. > > When installed in Debian it does not have password (AFAIR). It is > sufficient to execute "mysql -u root -p" and press ENTER to log in. > You then change the password. > > Regarding --skip-grant-tables I used this just last week to reset a > root password for a customer. > It seems there are two different methods depending on what version > you use. > > > but I can't log in with either user after restarting MariaDB with: > > sudo systemctl start mariadb > > > > Could be that you have something on the network side? From which host > do you log in? > > > Seems I must always log in with > > mysql -u root -p > > > > This is working only on localhost > > > There are lots of web pages mentioning this problem but none are > > complete enough and my attempts have failed. > > > > SO.....Looking for a "bulletproof" document to set up MariaDB users > > so I can get on with configuring Mediawiki. > > > > Just try > mysql -u root -p -h localhost > > > I don't want to login as a 'root'@'localhost' user for routine DB > > work and would rather use the 'mediawiki'@localhost' user for that. > > > So > mysql -u mediawiki -p -h localhost > is not working as well? > > I use following and never had issue with that > > CREATE USER 'mediawiki'@'localhost' IDENTIFIED BY 'xxxxxxxxxxx'; > GRANT Select ,Insert ,Update ,Delete ,Create ,Drop , Index ,Alter ON > mediawiki.* TO 'mediawiki'@'localhost'; > flush privileges; > > Remember the client can access only on local host. > You don't even need the CREATE USER. You can GRANT xxxxxxxx TO 'fred'@'localhost' IDENTIFIED BY 'yyyyyyy' which will create user and privileges at the same time. Remember that modern versions of MySQL/MariaDB will not allow logging in as root unless you are already logged in to the terminal as operating system root. This means that phpmyadmin, if you use it, cannot login to the database root account, and you need a differently-named account with all privileges, including GRANT. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | Keith Christian <keith1christian@gmail.com> |
|---|---|
| Date | 2020-12-14 14:10 +0100 |
| Subject | Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package |
| Message-ID | <BlVLY-4vz-11@gated-at.bofh.it> |
| In reply to | #229749 |
On Mon, Dec 14, 2020 at 4:22 AM Joe <joe@jretrading.com> wrote: > > On Mon, 14 Dec 2020 10:01:15 +0100 > deloptes <deloptes@gmail.com> wrote: > You don't even need the CREATE USER. > You can GRANT xxxxxxxx TO 'fred'@'localhost' IDENTIFIED BY 'yyyyyyy' > which will create user and privileges at the same time. > Remember that modern versions of MySQL/MariaDB will not allow logging > in as root unless you are already logged in to the terminal as operating > system root. This means that phpmyadmin, if you use it, cannot login to > the database root account, and you need a differently-named account with > all privileges, including GRANT. Joe, Thanks for the GRANT hint and the reminder to configure users in a terminal as root. No phpmyadmin in use here, I'm using the terminal for everything, same as in my $realjob. Appreciate the reply, I'll try this new info from you and Deloptes and see how it goes. Keith
[toc] | [prev] | [next] | [standalone]
| From | Keith Christian <keith1christian@gmail.com> |
|---|---|
| Date | 2020-12-15 17:30 +0100 |
| Subject | Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package |
| Message-ID | <Bmln3-32f-1@gated-at.bofh.it> |
| In reply to | #229752 |
Deloptes, Joe, SUCCESS. Thanks for all the help. Keith
[toc] | [prev] | [next] | [standalone]
| From | Keith Christian <keith1christian@gmail.com> |
|---|---|
| Date | 2020-12-14 14:10 +0100 |
| Subject | Re: Debian 10 Buster - difficulty setting up mariaDB 10.3.27 users for use with Debian mediawiki 1.31 package |
| Message-ID | <BlVLY-4vz-13@gated-at.bofh.it> |
| In reply to | #229747 |
On Mon, Dec 14, 2020 at 2:01 AM deloptes <deloptes@gmail.com> wrote: > > Keith Christian wrote: > When installed in Debian it does not have password (AFAIR). It is sufficient > to execute "mysql -u root -p" and press ENTER to log in. You then change > the password. > Regarding --skip-grant-tables I used this just last week to reset a root > password for a customer. > It seems there are two different methods depending on what version you use. > Could be that you have something on the network side? From which host do you > log in? > So > mysql -u mediawiki -p -h localhost > is not working as well? > CREATE USER 'mediawiki'@'localhost' IDENTIFIED BY 'xxxxxxxxxxx'; > GRANT Select ,Insert ,Update ,Delete ,Create ,Drop , Index ,Alter ON > mediawiki.* TO 'mediawiki'@'localhost'; > flush privileges; Deloptes, I will try the login method and 'grant' as you suggest above. The database is on the same host, I should have mentioned that, and I see now that the setup for MariaDB has changed from when I last installed a mediawiki instance under Debian. Thanks for the info!
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web