Problem with MySQL(MariaDB)

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Problem with MySQL(MariaDB)

Postby toogaze » Sun Oct 27, 2013 4:59 pm

(Note: If this is in the wrong forum, please move it as needed. I put it here in the Raspberry Pi section because I know that Arch Linux and Arch Linux on the RPi differ)

Hey guys.

Just to begin, I'm a HUGE noobie in this whole RPi stuff, and I'm trying to make a LEMP server. I installed everything onto my RPi a few weeks ago, but since then I've moved onto a VM to practice. Today, I thought I might move some stuff over onto the RPi. I checked the status of mysqld, nginx, and php-fpm to make sure everything was up and running. I had already started a little bit, enabled PHP and whatnot. I checked the pages on a webbrowser, and everything was cool. I figured I'd start by making a MySQL in the same manner that I had used in the VM (note that I have .php files on the VM that properly display data from a sample DB) so I typed out
$this->bbcode_second_pass_code('', 'sudo mysqld -u root -p')
and immediately i got an error. It had something to do with the Aria control, so I checked it out on google. I found a few different pages with some solutions, and after trying them, I had no success. I deleted log files, renamed them, made backups... This lead to more errors, which when I tried fixing I just got brought back to my original error. I reinstalled mariadb a few times as well....

I got fed up with it, so I decided to just remove every file that mysql creates when installed, or so I thought I did. I reinstalled mariadb, and when I try running it, I'm still getting some errors. When I first try to start the service and do a secure install, I get this:

$this->bbcode_second_pass_code('', '
[matt@mattpi ~]$ sudo systemctl start mysqld && mysql_secure_installation
Job for mysqld.service failed. See 'systemctl status mysqld.service' and 'journalctl -xn' for details.')

So, I do what it says. This is my systemctl status mysqld.service output:

$this->bbcode_second_pass_code('', '
[matt@mattpi ~]$ sudo systemctl status mysqld.service -l
mysqld.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
Active: activating (start-post) since Sun 2013-10-27 16:54:30 UTC; 38s ago
Main PID: 12355 (mysqld); : 12356 (mysqld-post)
CGroup: /system.slice/mysqld.service
|-12355 /usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid
`-control
|-12356 /bin/sh /usr/bin/mysqld-post
`-12638 sleep 1

Oct 27 16:54:30 mattpi mysqld[12355]: 131027 16:54:30 InnoDB: Compressed tables use zlib 1.2.8
Oct 27 16:54:31 mattpi mysqld[12355]: 131027 16:54:31 InnoDB: Initializing buffer pool, size = 128.0M
Oct 27 16:54:31 mattpi mysqld[12355]: 131027 16:54:31 InnoDB: Completed initialization of buffer pool
Oct 27 16:54:31 mattpi mysqld[12355]: 131027 16:54:31 InnoDB: highest supported file format is Barracuda.
Oct 27 16:54:31 mattpi mysqld[12355]: 131027 16:54:31 InnoDB: Waiting for the background threads to start
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 Percona XtraDB (http://www.percona.com) 5.5.33a-MariaDB-31.1 started; log sequence number 1597945
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 [Note] Server socket created on IP: '0.0.0.0'.
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 [Note] Event Scheduler: Loaded 0 events
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 [Note] /usr/bin/mysqld: ready for connections.
Oct 27 16:54:32 mattpi mysqld[12355]: Version: '5.5.33a-MariaDB-log' socket: '/run/mysqld/mysqld.sock' port: 3306 Source distribution
')

And here is my journalctl -xn
$this->bbcode_second_pass_code('', '
[matt@mattpi ~]$ sudo journalctl -xn
-- Logs begin at Thu 1970-01-01 00:00:03 UTC, end at Sun 2013-10-27 16:55:21 UTC. --
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 Percona XtraDB (http://www.percona.com) 5.5.33a-MariaDB-31.1
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 [Note] Server socket created on IP: '0.0.0.0'.
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 [Note] Event Scheduler: Loaded 0 events
Oct 27 16:54:32 mattpi mysqld[12355]: 131027 16:54:32 [Note] /usr/bin/mysqld: ready for connections.
Oct 27 16:54:32 mattpi mysqld[12355]: Version: '5.5.33a-MariaDB-log' socket: '/run/mysqld/mysqld.sock' port: 3306
Oct 27 16:55:09 mattpi sudo[12617]: matt : TTY=pts/0 ; PWD=/home/matt ; USER=root ; COMMAND=/usr/bin/systemctl stat
Oct 27 16:55:09 mattpi sudo[12617]: pam_unix(sudo:session): session opened for user root by matt(uid=0)
Oct 27 16:55:09 mattpi sudo[12617]: pam_unix(sudo:session): session closed for user root
Oct 27 16:55:21 mattpi sudo[12724]: matt : TTY=pts/0 ; PWD=/home/matt ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Oct 27 16:55:21 mattpi sudo[12724]: pam_unix(sudo:session): session opened for user root by matt(uid=0)
lines 1-11/11 (END)
')

I'm not really sure what to do from here. I see that the service didn't actually FAIL it just didn't start.
Any help with this would be incredible and greatly appreciated.
toogaze
 
Posts: 2
Joined: Sun Oct 27, 2013 4:42 pm

Re: Problem with MySQL(MariaDB)

Postby sdjf » Sun Oct 27, 2013 9:58 pm

I think you have to enable the service before you can start it, but am not sure which command to use to do that. Once it is enabled, it stays enabled. Where did you put the service file?

You can google how to enable a systemd service.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: Problem with MySQL(MariaDB)

Postby WarheadsSE » Mon Oct 28, 2013 12:46 am

You do not have to enable a service to start it. 'Enable'ing a service just makes it start at boot.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Problem with MySQL(MariaDB)

Postby toogaze » Tue Oct 29, 2013 12:50 am

Hey! So I'm an idiot. I knew the command to start is mysqld, BUT, the command to actually run MySQL is just that, without the 'd' at the end. So you can actually delete this thread if that's possible haha.
toogaze
 
Posts: 2
Joined: Sun Oct 27, 2013 4:42 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 3 guests