SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
All my servers are running Slackware 14.0 (or 13.37) for now. I'm considering migrating them to Slackware 14.1. I know MySQL has been replaced by MariaDB, which is supposed to be compatible. But as far as I can tell, the initialization routine has changed.
This doesn't seem to work anymore. Anybody knows where I can find a reliable quick-and-dirty (or thorough-the-hard-way) HOWTO to setup MariaDB under Slackware 14.1 ?
Note that there will now be a "/etc/my.cnf" file which includes all the configuration files in a directory "/etc/my.cnf.d/" which contains different server- and client-focused configurations (by default, they are empty as far as I know).
3. When I log in to the database monitor using mysql -u root -p, I get the following console:
Code:
MariaDB [(none)]>
If I understand this right, MariaDB shows me the currently selected database.
That's just the prompt, which is pretty much as configurable as your shell prompt. MariaDB just changed the default to, as you correctly stated, show the name of the database you are currently using.
Note that the configuration file changes are just structural. Nothing prevents you from copying your old my.cnf file over and completely ignoring /etc/my.cnf.d.
My experience here with several php-based applications is that the switch is really transparent. All tools and scripts continue to work as they did with MySQL 5.5. YMMV, of course, but I would not expect problems.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
When I installed 14.1, there were no problems with existing MySQL data bases (or LAMP applications), everything "just works." I was busy with other stuff and didn't even look at the .cnf files. Did have to fiddle with HTTP (a little, it changed) but, so far, no problems.
Hm; maybe I've got to get on the stick and see if I can break something, eh?
Setting up users under MariaDB on Slackware64 14.1
I am trying to move a DB I have running on an old computer to my new one. The old computer is running Slackware 11 and mySQL. My new computer runs Slackware64 and MariaDB. The database itself is up and running and I can log into it as root. Now I want to add users. I have some cheat sheets which I pulled out and I tried to use them. But the DB responds that I have the wrong number of columns. Clearly I need to update my cheat sheets. Can someone point me in the right directions?
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Perhaps it would be useful to start at the beginning? The documentation is found at https://mariadb.com/kb/en/mariadb/do...tting-started/ with links to chapters (look down the right-hand side for User Account Management).
Of course I did try to find the answer before I posted the question here and that was one of the places I looked. The old mySQL manuals had detailed instructions and I suspect the new ones do too, if I can find the right place. Anyway I D/Ld the "refman" file and I intend to go through it soon. I'll let you know if I find what I seek. Thanks.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Let's see what we can do here.
Here's the SQL I use to create a data base named gnis. This particular data base gets dropped and recreated every so often (which is why the commented-out drop line is there) and grants permissions to the administrator (a user named "gnis" with a password "gnispassword") and grants permissions to a user (named "UserName" here -- you would change that to the actual name of a user -- and a password "PassWord" -- you would change that to an actual password).
Code:
# drop database if exists gnis;
create database if not exists gnis;
grant select, insert,
update, delete, index, alter, create, lock tables,
create temporary tables, drop, references on gnis.*
to gnis@localhost identified by 'gnispassword';
grant select, insert,
update, delete, index, alter, create, lock tables,
create temporary tables, drop, references on gnis.*
to UserName@localhost identified by 'PassWord';
grant select, insert,
update, delete, index, alter, create, lock tables,
create temporary tables, drop, references on gnis.*
to gnis@'%' identified by 'gnispassword';
grant select, insert,
update, delete, index, alter, create, lock tables,
create temporary tables, drop, references on gnis.*
to UserName@'%' identified by 'PassWord';
flush privileges;
then each data base schema is added the same way (I keep data base schema files that contain only the schema, index statements and the like) and I would typically load data from individual files (some are pretty big, multiple gigabyte, some are small). I prefer doing things that way, your methods will most likely be yours and not mine.
Anyway, that's pretty much what you do to create users and grant permissions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.