Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  How to use one instance of MariaDB with Akonadi and LAMP?  (Read 3463 times)

Offline vayu

  • User
  • Posts: 232
I'm on Patience.
I want to make sure I'm only running one instance of MariaDB for both Akonadi and for a LAMP setup.  How do I make Akonadi use the same instance for all my database uses?  Right now I can't even use mysql because Akonadi has a password other than mine.
Code: [Select]
mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
« Last Edit: 2018/01/18, 05:07:59 by vayu »

Offline vayu

  • User
  • Posts: 232
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #1 on: 2018/01/18, 07:21:33 »
It's been frustrating, page after page of things to try that all failed.  I've finally found something that got me into my database server.   https://community.centminmod.com/threads/how-to-reset-mysql-root-user-password-for-centos-7-mariadb-10-1-19.9811/


Now I can continue setting up LAMP.   I still want to understand how Akonadi uses the server and make sure when combined with my web server that it's as light as possible and only using one instance.  How is Akonadi set up and how can I make sure it's not running a separate database server/instance?

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline vayu

  • User
  • Posts: 232
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #3 on: 2018/01/18, 08:39:21 »
Thanks, I've got MariaDB working and Apache and phpMyadmin all working.  What I want is to understand Akonadi and how it's setup on Patience. Does it use it's own server, is it using a separate instance?  There is no databases for it in the MariaDB I've got running, yet it had locked me out of access to it, so where is it's data, how is it set up?

Offline jure

  • User
  • Posts: 635
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #4 on: 2018/01/18, 09:27:31 »
have a look at https://userbase.kde.org/Akonadi, my be there are some more information ?
Gruss Juergen

Offline vayu

  • User
  • Posts: 232
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #5 on: 2018/01/18, 13:38:11 »
Quote
have a look at https://userbase.kde.org/Akonadi, my be there are some more information ?
Thanks, that's a great article. For the first time I understand what has always been a big mystery for me.  That overview helps a lot. Maybe now I'll not be so confused when I dive into akonadiconsole.

Offline vayu

  • User
  • Posts: 232
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #6 on: 2018/01/18, 16:18:44 »

Ok finally got it working. Solution for future searchers:


To get Akonadi to use a global MariaDB database instead of its own local one I had two separate problems. 
MariaDB is what debian uses now and Akonadi has its own local one in use. First I installed mariadb-server, mariadb-client and phpmyadmin. akonadi-backend-mysql is needed but already installed. I didn't have to remove any packages.


The problem was that I couldn't get root access to the mariadb server. I believe because Akonadi but I don't know.  The countless articles I found on how to get in a lost password server didn't work. The link I posted above finally got me access.


My second issue was how to get Akonadi to use the global server rather than it's own separate local one.  (If I'm running a web server on my own local desktop machine that no one accesses I don't want two instances of a database server running)


In ~/.config/akonadi/akonadiserverrc I had to change some settings.


Code: [Select]


[QMYSQL]
##Options="UNIX_SOCKET=/tmp/akonadi-satyam.dgnFnR/mysql.socket"
##ServerPath=/usr/sbin/mysqld-akonadi
Host=
Name=akonadi
Options="UNIX_SOCKET=/var/run/mysqld/mysqld.sock"
ServerPath=/usr/sbin/mysqld


##StartServer=true


StartServer=false


"StartServer=false" stops Akonadi from using the local server


Change the path of the database server from the local "mysqld-akonadi" to the global server "mysqld"
Go to the file "/etc/mysql/mariadb.conf.d/50-client.cnf" to find the socket the global server is using. In my case it was "/var/run/mysqld/mysqld.sock".


Next I had to go to phpMyAdmin and create a user the same as my login user, set it to use no password. Then create a database named "akonadi" and associate it with that user and give it all permissions.


I started the whole affair with the terminal command (as normal user) "akonadictl stop", now it's time for "akonadictl start".


I started with an empty akonadi. I don't know what you'd do if you wanted to export and import your old data first.

« Last Edit: 2018/01/18, 16:26:51 by vayu »

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #7 on: 2018/01/18, 22:35:52 »
Glad you got things working :)

Quote from: vayu
mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'


Akonadi, Amarok, Mythtv, etc all the same, you had permission problems, hence the link I gave you :) it also helps to know the names of the databases.

I've never used phpMyadmin, looks nice, might try it, I do everything command line.

Mythtv uses mythconverge for database (or anything you name it)

Code: [Select]
mysql -u mythtv --password=mythtv -p -h 10.10.10.3 mythconverg

grant all privileges on *.* to 'mythtv'@'10.10.10.3' with grant option;

flush privileges;

Code: [Select]
select user,host from user where user='root';

select user,host from user where user='username';


+--------+------------+
| user   | host       |
+--------+------------+
| mythtv | %          |
| mythtv | 10.10.10.3 |
| mythtv | localhost  |
| root   | localhost  |
+--------+------------+
4 rows in set (0.00 sec)


Some packages/databases need to load time zones on systems that have a zoneinfo database to load the time zone tables

Code: [Select]
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
I usually bind an IP address in /etc/mysql/mariadb.conf.d/50-server.cnf makes this easier also.

If there is no database, you have to create one

Code: [Select]
create database nameofdatabase;       

You can erase an existing database and start fresh or just erase one you don't need anymore

Code: [Select]
DROP DATABASE IF EXISTS nameofdatabase;   

I don't know a whole lot, but mythtv forces you to learn a little ;)




Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline vayu

  • User
  • Posts: 232
Re: How to use one instance of MariaDB with Akonadi and LAMP?
« Reply #8 on: 2018/01/19, 00:42:22 »
The permission problems were no fun. It definitely helps to know the database name and password.  Looks like you've got good experience with that issue.   ;)