fabian77
Posts: 7
Joined: Sat Apr 19, 2014 10:06 am

Could not start MariaDB service

Sun Jun 15, 2014 3:04 pm

hi there,
Has anyone in here succesfully installed mariadb/mysql with the newest release of archlinux arm for raspberry pi (from may 2014)?

After installation i tryed to start mysql with
sudo systemctl start mysqld
after a few seconds i receive an error telling me to have a look at status report and log file, status-command is showing an output which starts with the following lines:
mysqld.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled)
Active: activating (start-post) (Result: exit-code) since Fri 2013-08-02 11:51:18 EDT; 40s ago
Process: 1603 ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
trying to start mysql manually with
/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid
results in a lot of permmision errors...so i think it's a problem of wrong permissions for files and directories. Am logged in as a manual created user pi with sudo-rights...

no clue how to solve that, tryed a lot around with hints and tips from different sources allready, mainly with chmod or chown-commands...but no success at all, the mysql-services don't start.

maybe someone could help?

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Could not start MariaDB service

Tue Jun 17, 2014 3:06 am

sudo rights do not cover every command issued, not without their being invoked with sudo each time. have you tried starting the command with sudo at the start of the line?

by the way, I have no experience with mariaDB or the latest image, this is just based on my own experience on another linux system where I am never logged in as root. On that system, I have to type sudo before every command that requires root access.

On my pi, I have disabled remote root logins, and when I need root privileges, I instead change my permissions with su (instead of sudo), that gives me root privileges for the commands I enter, without having to do sudo. su and sudo are different ways that a non-root user can get root privileges - one is temporary, the other for the whole session.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
DougieLawson
Posts: 39126
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Could not start MariaDB service

Tue Jun 17, 2014 9:35 am

Have you checked the syslog for permission problems?

MariaDB is normally a simple drop-in replacement for MySQL.

It needs write to /var/run/mysqld (where the sock file and pid file are written)
It needs write to /var/mysql (where the databases are written (basedir & datadir directive in my.cnf))
It needs write to /var/log/mysql (various log directives)
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

fabian77
Posts: 7
Joined: Sat Apr 19, 2014 10:06 am

Re: Could not start MariaDB service

Tue Jun 17, 2014 5:52 pm

hi
tryed all commands with sudo as well, same problems.

haven't changed a lot from base-installation. am logged in as user "pi", which i created manually and added to group "wheel". that group i gave sudo-permissions in sudoers config file. just started with linux a few weeks ago (raspbian 1st, then with arch) first on my pi and an on a desktop-pc meanwhile as well (gave debian wheezy a try there) :-) means that i'm liking it, but very newbish to it at all.

the used directorys are owned by user/grp mysql...

how can i see content of that syslog you mentioned?

excuse my english as it's not my native language;-)

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Could not start MariaDB service

Tue Jun 17, 2014 7:40 pm

I am not sure about permissions, as I am running as root, but your logs are in the /var/log directory.

You can either point a browser to that directory, or read the logs with command line commands like "more" or "less".

Too see what all the logs are in your /var/log, you would type:

ls -l /var/log/* | less

I am piping the output of the ls command to less (with the | pipe) so you can see everything slowly, instead of too many lines scrolling past on the screen.

You should see logs named /var/log/syslog.log and /var/log/everything.log, or your system is not set up to log everything. Some services will have logs there even if you do not see everything.log and syslog.log, just poke around and see what is there!
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

Return to “Arch”