Re: Useable guide to first invocation of mariadb - where?
On Mon, 8 May 2017 10:06:33 -0500
Richard Owlett <email@example.com> wrote:
> Random meandering thru the help system yields documentation of
> "account management" on the microscopic details (with links into
> https://mariadb.com/kb/en/mariadb/account-management-sql-commands/ ).
> *NO USEFUL OVERVIEW*
> I can create users and associated passwords.
> But what *VITAL* things will be missing?
> I, myself, will be creating any databases. But I do want to know that
> all will be ready for the installation of WordPress to function.
I do not believe it has diverged far from the user interface of mysql,
and it will need to maintain backward compatibility for a while, and
there's plenty of this kind of thing around:
What should have happened during installation was that you were asked
to create a root password, and it looks as if that happened as you can
talk to it as root. As far as I recall, there shouldn't be anything
else to do. It will have created its own housekeeping databases.
Have a play with the SHOW DATABASES, USE <database>, SHOW TABLES
commands to see what's there.
If you have apache and php running, I'd recommend phpmyadmin as a
fairly painless way to deal with mysql/mariadb.
I know nothing of Wordpress, but in general, if you install an
application which wants to use mysql, it will ask for the mysql root
password in order to create its databases and tables, and will create
any users necessary. After the installation, it will hopefully have
forgotten the root account....
By the way, as a new database user, apart from the identical name (and
therefore the default login if you don't provide a user name on the
command line), the mysql root user has nothing to do with the Linux root
user. It is a separate entity, within mysql. They need not (and
shouldn't) have the same password. Note also what someone else here was
confused about recently, that mysql knows users by both name and client
computer hostname, so richard@comp1 is a different user to
richard@comp2, and different again to richard@localhost and richard@%.
The '%' is the SQL wildcard. As different users, they can have different
privileges and passwords e.g richard@comp1 can use database fred but not
database bill, and richard@localhost can use bill but not fred.
Wordpress will almost certainly name its user(s) 'xxx@localhost', and
that account will not work from anywhere else. I mention this in detail
because it took me a while to get the hang of it.
List the users/hosts with USE mysql; SELECT * FROM user;
Don't mess with user privileges until you understand them, a large
variety of privileges can exist globally, per database, per table and
per column. A user set up by an application will (hopefully) have
exactly the correct set of privileges.