Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
04-14-2014, 12:40 AM
|
#1
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
|
Setting up MySQL/MariaDB under Slackware 14.1
Hi,
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.
Here's my documentation for MySQL under 14.0:
http://www.microlinux.fr/slackware/L...ySQL-HOWTO.txt
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 ?
Cheers,
Niki
|
|
|
04-14-2014, 12:48 AM
|
#2
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
Original Poster
|
OK, here's what I could figure out for now.
1. All the my-small.cnf, my-medium.cnf, ... files in /etc/mysql have gone. Apparently there's no replacement for these. Correct me if I'm wrong.
2. Everything else seems to work as before.
3. When I log in to the database monitor using mysql -u root -p, I get the following console:
If I understand this right, MariaDB shows me the currently selected database.
4. Any other surprises to be expected?
|
|
1 members found this post helpful.
|
04-14-2014, 02:15 AM
|
#3
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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).
Eric
|
|
1 members found this post helpful.
|
04-15-2014, 02:49 AM
|
#4
|
Slackware Contributor
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 632
|
Quote:
Originally Posted by kikinovak
3. When I log in to the database monitor using mysql -u root -p, I get the following console:
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.
|
|
|
04-15-2014, 06:59 AM
|
#6
|
LQ Newbie
Registered: May 2013
Posts: 12
Rep:
|
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.
|
|
|
04-15-2014, 08:06 AM
|
#7
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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?
|
|
|
10-17-2014, 02:25 AM
|
#8
|
Member
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283
Rep:
|
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?
|
|
|
10-17-2014, 05:53 AM
|
#9
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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).
Hope this helps some.
Last edited by tronayne; 10-17-2014 at 05:57 AM.
|
|
|
10-19-2014, 06:03 AM
|
#10
|
Member
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283
Rep:
|
I did look there but ...
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.
|
|
|
10-19-2014, 07:43 AM
|
#11
|
Slackware Contributor
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 632
|
Just to be sure, you did run mysql_upgrade on the old database before trying to create users, right?
|
|
|
10-19-2014, 08:01 AM
|
#12
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
Hope this helps some.
|
|
2 members found this post helpful.
|
All times are GMT -5. The time now is 08:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|