LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-10-2022, 01:36 AM   #1
slackuj
Member
 
Registered: Oct 2021
Location: Nepal
Distribution: Debian 11,Slackware
Posts: 41

Rep: Reputation: Disabled
setting up the mysql/mariadb database on slackware!


Can anyone please guide me to setup the mysql/mariadb database server on my slackware?

Few weeks ago,I was practicing qt5 where I needed to access the mysql database.The qt5 documentation
suggested to use XAMPP for accessing mysql.I haven't tried XAMPP yet though.Because I want to run mysql
from scratch.I looked out for the documentation in mariadb and mysql websites,but I couldn't get the
job done.


Once again,I have stumbled into mysql while learning scripting.This was the thing that I always wanted to do.

I want to run mysql using terminal.

Please guide me to setup mysql(slackware uses mariadb if I am not wrong) on my slackware current.
I think I can learn mysql once I get to set it up.
 
Old 12-10-2022, 03:37 AM   #2
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 590

Rep: Reputation: Disabled
Just follow the instructions in the boot script:
https://git.slackware.nl/current/tre...iadb/rc.mysqld

Also, see https://docs.slackware.com/howtos:da...b_on_slackware
 
4 members found this post helpful.
Old 12-10-2022, 11:43 AM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Running mysql_secure_installation after mysql_install_db --user=mysql is recommended (set up mysql root password, delete test db...)
 
Old 12-10-2022, 03:10 PM   #4
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 502

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
I always forget to enable networking in /etc/rc.d/rc.mysqld
Code:
# To start MariaDB automatically at boot, be sure this script is executable:
# chmod 755 /etc/rc.d/rc.mysqld

# Before you can run MariaDB, you must have a database.  To install an initial
# database, do this as root:
#
#   mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# will be owned by this dedicated user.  This is important, or else mysql
# (which runs as user "mysql") will not be able to write to the database
# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
#
# To increase system security, consider using "mysql_secure_installation"
# as well.  For more information on this tool, please read:
#   man mysql_secure_installation

# To allow outside connections to the database comment out the next line.
# If you don't need incoming network connections, then leave the line
# uncommented to improve system security.
#SKIP="--skip-networking"
This isn't mentioned in the wiki page and the amount of time I've spent pulling my hair out over this one is pretty embarassing.
 
2 members found this post helpful.
Old 12-10-2022, 10:21 PM   #5
truepatriot76
Member
 
Registered: Apr 2014
Location: California, USA
Distribution: slackware64-current
Posts: 231

Rep: Reputation: 195Reputation: 195
You weren't the only one Pithium... it got me too.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Create a Database, Database User and Grant Privileges in MySQL/MariaDB LXer Syndicated Linux News 0 12-05-2019 08:03 PM
LXer: KDE Participating in Google Summer of Code 2019, MariaDB Releasing New Open-Source MariaDB Enterprise Server, CentOS Celebrates 15th B LXer Syndicated Linux News 0 02-28-2019 06:50 AM
[SOLVED] mariadb mysql Compatibility issue GRANT ALL ON database.* TO 'user'; enyawix Linux - Server 3 01-30-2016 10:46 PM
Setting up MySQL/MariaDB under Slackware 14.1 kikinovak Slackware 11 10-19-2014 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration