Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] MYSQL mit systemd?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Tue Nov 19, 2013 12:56 pm    Post subject: [gelöst] MYSQL mit systemd? Reply with quote

Ich würde gerne meinen amarok auf eine esxterne MYSQL-DB umklemmen. Die Anleitungen habe ich , scheitere aber an MYSQL...

Code:
 mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Den Socket habe ich nicht:

Code:
 find / -type s
/tmp/virt_1113
/tmp/orbit-uhai/linc-3db-0-c8b39e15449d
/tmp/orbit-uhai/linc-3bb-0-6e9d832fca426
/tmp/orbit-uhai/linc-3be-0-1e15a87397a2b
/tmp/pulse-fpR2SyxhjUop/dbus-socket
/tmp/pulse-fpR2SyxhjUop/native
/tmp/akonadi-uhai.bW6G6f/mysql.socket
/tmp/ksocket-uhai/kio_http_cache_cleaner
/tmp/ksocket-uhai/klauncherXMT726.slave-socket
/tmp/ksocket-uhai/kdeinit4__0
/tmp/ksocket-kdm/kdeinit4__0
/tmp/.ICE-unix/753
/tmp/.X11-unix/X0
/run/xdmctl/dmctl-:0/socket
/run/xdmctl/dmctl/socket
/run/cups/cups.sock
/run/dhcpcd.sock
/run/dbus/system_bus_socket
/run/user/1000/systemd/private
/run/udev/control
/run/systemd/journal/socket
/run/systemd/journal/stdout
/run/systemd/shutdownd
/run/systemd/private


Die Beteiligten:

Code:
eix systemd
[I] sys-apps/gentoo-systemd-integration
     Available versions:  1 ~2 **9999
     Installed versions:  1(22:31:00 01.10.2013)
     Homepage:            https://bitbucket.org/mgorny/gentoo-systemd-integration
     Description:         systemd integration files for Gentoo

[I] sys-apps/systemd
     Available versions:  204-r1 (~)204-r2 (~)204-r3 (~)207-r2 (~)208-r1(0/1) (~)208-r2(0/1) **9999(0/1) {acl audit cryptsetup doc +filecaps +firmware-loader gcrypt gudev http introspection keymap +kmod lzma openrc pam policykit python qrcode selinux static-libs tcpd test vanilla xattr ABI_MIPS="n32 n64 o32" ABI_X86="32 64 x32" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7"}
     Installed versions:  208-r2(20:12:20 14.10.2013)(acl filecaps firmware-loader gudev introspection kmod pam policykit python tcpd -audit -cryptsetup -doc -gcrypt -http -lzma -qrcode -selinux -test -vanilla -xattr ABI_MIPS="-n32 -n64 -o32" ABI_X86="64 -32 -x32" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7")
     Homepage:            http://www.freedesktop.org/wiki/Software/systemd
     Description:         System and service manager for Linux


Code:
eix -I mysql
[I] dev-db/mysql
     Available versions:  [M]4.0.27-r1 [M]4.1.22-r1 [M]5.0.96 5.1.70 ~5.5.32 {berkdb big-tables cluster +community debug embedded extraengine jemalloc latin1 max-idx-128 minimal pbxt (+)perl profiling raid selinux ssl static systemtap tcmalloc test xtradb}
     Installed versions:  5.1.70(12:33:14 19.11.2013)(big-tables community embedded perl ssl -cluster -debug -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling -selinux -static -test -xtradb)
     Homepage:            http://www.mysql.com/
     Description:         A fast, multi-threaded, multi-user SQL database server.

[I] dev-db/mysql-init-scripts
     Available versions:  1.2 2.0_pre1-r2 2.0_pre1-r3 2.0_pre1-r6
     Installed versions:  2.0_pre1-r6(14:56:26 17.11.2013)
     Homepage:            http://www.gentoo.org/
     Description:         Gentoo MySQL init scripts.


Vermutlich ist da was schief gegangen bei der Umstellung auf systemd. Leider ist mysql-Doku noch auf openrc...

Seltsamerweise kann aber akonadi auf den SQL-Server zugreifen (scheitert dann aber an einem anderen Problem).

systemctl enable mysql.system habe ich gemacht, aber bekomme nur

Code:
mysqld.service        loaded failed failed    MySQL database server


Wie kann ich mysql nun zum Laufen bringen, um die Datenbank für amarok anzulegen?

uhai


Last edited by uhai on Sat Nov 23, 2013 8:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Nov 19, 2013 2:22 pm    Post subject: Reply with quote

Schonmal ins MySQL Log geschaut?
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Tue Nov 19, 2013 3:47 pm    Post subject: Reply with quote

Hätte ich wohl auch drauf kommen sollen :?

Scheint, als ob die Tabellen nach einem crash zerschossen wären:

Code:
131119 14:31:15 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
131119 14:31:15 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
131119 14:31:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
131119 14:31:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131119 14:31:16 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
131119 14:31:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131119 14:31:16  InnoDB: Initializing buffer pool, size = 16.0M
131119 14:31:16  InnoDB: Completed initialization of buffer pool
InnoDB: Log scan progressed past the checkpoint lsn 0 37356
131119 14:31:16  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 44233
131119 14:31:16  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
131119 14:31:16  InnoDB: Started; log sequence number 0 44233
131119 14:31:16 [Note] Recovering after a crash using mysqld-bin
131119 14:31:16 [Note] Starting crash recovery...
131119 14:31:16 [Note] Crash recovery finished.
131119 14:31:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
131119 14:31:17 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
131119 14:31:17 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended


Was tun?

uhai
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Nov 19, 2013 4:19 pm    Post subject: Reply with quote

Hast du MySQL überhaupt schon intialisiert, wie vom ebuild gefordert?
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Tue Nov 19, 2013 4:28 pm    Post subject: Reply with quote

hat er abgebrochen, Neuinstallation hat ebenfalls nicht geholfen...

Vielleicht muss ich noch Relikte löschen?

uhai
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Nov 19, 2013 4:33 pm    Post subject: Reply with quote

Was hat er abgebrochen?

Gab es dabei evtl. eine Fehlermeldung?
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Tue Nov 19, 2013 4:37 pm    Post subject: Reply with quote

Die Initialisierung nach dem emerge..

Den Befehl habe ich nicht mehr im Kopf, kann ich nicht wiederholen... Fehler vergessen...

uhai

Doch, war noch in der pipe:
Code:
 emerge --config =dev-db/mysql-5.1.70


Configuring pkg...

 * You have already a MySQL database in place.
 * (///var/lib/mysql/*)
 * Please rename or delete it if you wish to replace it.
 * ERROR: dev-db/mysql-5.1.70::gentoo failed (config phase):
 *   MySQL database already exists!
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_config
 *   environment, line 4198:  Called mysql-v2_pkg_config
 *   environment, line 3797:  Called die
 * The specific snippet of code:
 *           die "MySQL database already exists!";
 *
 * If you need support, post the output of `emerge --info '=dev-db/mysql-5.1.70::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-5.1.70::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.1.70/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.1.70/temp/environment'.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/var/tmp/portage/dev-db/mysql-5.1.70/work/mysql-5.1.70'


Code:
 ls -ali /var/lib/mysql
insgesamt 20532
 258102 drwxr-x---  4 mysql mysql     4096 19. Nov 14:31 .
  40961 drwxr-xr-x 38 root  root      4096 19. Nov 14:40 ..
4720666 -rw-r--r--  1 root  root         0 19. Nov 12:33 .keep_dev-db_mysql-0
 135501 -rw-rw----  1 mysql mysql  5242880 19. Nov 14:31 ib_logfile0
 135503 -rw-rw----  1 mysql mysql  5242880 19. Nov 14:31 ib_logfile1
 135500 -rw-rw----  1 mysql mysql 10485760 19. Nov 14:31 ibdata1
4456713 drwx------  2 root  root      4096 19. Nov 12:15 mysql
 135505 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000001
 135507 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000002
 135508 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000003
 135509 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000004
 135511 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000005
 135512 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000006
 135513 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000007
 135514 -rw-rw----  1 mysql mysql      106 19. Nov 14:31 mysqld-bin.000008
 135499 -rw-rw----  1 mysql mysql      160 19. Nov 14:31 mysqld-bin.index
4456714 drwx------  2 root  root      4096 19. Nov 12:15 test


Was muss ich denn da löschen/umbenennen?

uhai
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Thu Nov 21, 2013 8:00 am    Post subject: Reply with quote

Alles was in dem Ordner ist.
Oder verschiebe es, falls es dir noch wichtig ist.
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Thu Nov 21, 2013 8:16 pm    Post subject: Reply with quote

Danke Finswimmer,

jetzt funktioniert die Konfiguration.

Allerdings bekomme ich immer einen Fehler beim MYSQL-Start:

Code:
 mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Der MYSQL-Start mit [code]systemctl enable mysqld.system funktioniert auch nicht:

[code]systemctl enable mysqld.system
Failed to issue method call: No such file or directory
[/code]

Hast du mysql mit systemd am Laufen?

uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Thu Nov 21, 2013 8:41 pm    Post subject: Reply with quote

mysqld.system - service!
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Thu Nov 21, 2013 8:51 pm    Post subject: Reply with quote

ok, bin wohl schon wieder zu müde...

Code:
 mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Danke ulenrich. Fehlt aber wohl noch immer etwas...

uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Thu Nov 21, 2013 11:22 pm    Post subject: Reply with quote

Code:
# cat /usr/lib/tmpfiles.d/mysql.conf
d /var/run/mysqld 0755 mysql mysql -
Ist Deine Anzeige von cat die gleiche?
(oder: cat /lib/tmpfiles.d/mysql.conf )
Wenn nicht, erstelle diese Datei unter tmpfiles.d!
(das resultierende mysql aus dem ebuild "mariadb", das ich benutze, ist vielleicht gepflegter)
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Fri Nov 22, 2013 5:43 am    Post subject: Reply with quote

Sieht gleich aus:
Code:
tux uhai #  cat /usr/lib/tmpfiles.d/mysql.conf
d /var/run/mysqld 0755 mysql mysql -


uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Fri Nov 22, 2013 9:54 am    Post subject: Reply with quote

Ich habe systemd-208. Aber auch, wenn du systemd-204 hast, sollte dort auch bei dir ...tmpfiles...service im sysinit vorkommen, wie hier:
Code:
# ls -ll /usr/lib/systemd/system/sysinit.target.wants/
total 0
lrwxrwxrwx 1 root root 20 14. Nov 22:50 cryptsetup.target -> ../cryptsetup.target
lrwxrwxrwx 1 root root 22 14. Nov 22:50 dev-hugepages.mount -> ../dev-hugepages.mount
lrwxrwxrwx 1 root root 19 14. Nov 22:50 dev-mqueue.mount -> ../dev-mqueue.mount
lrwxrwxrwx 1 root root 28 14. Nov 22:50 kmod-static-nodes.service -> ../kmod-static-nodes.service
lrwxrwxrwx 1 root root 36 14. Nov 22:50 proc-sys-fs-binfmt_misc.automount -> ../proc-sys-fs-binfmt_misc.automount
lrwxrwxrwx 1 root root 32 14. Nov 22:50 sys-fs-fuse-connections.mount -> ../sys-fs-fuse-connections.mount
lrwxrwxrwx 1 root root 26 14. Nov 22:50 sys-kernel-config.mount -> ../sys-kernel-config.mount
lrwxrwxrwx 1 root root 25 14. Nov 22:50 sys-kernel-debug.mount -> ../sys-kernel-debug.mount
lrwxrwxrwx 1 root root 36 14. Nov 22:50 systemd-ask-password-console.path -> ../systemd-ask-password-console.path
lrwxrwxrwx 1 root root 25 14. Nov 22:50 systemd-binfmt.service -> ../systemd-binfmt.service
lrwxrwxrwx 1 root root 32 14. Nov 22:50 systemd-journal-flush.service -> ../systemd-journal-flush.service
lrwxrwxrwx 1 root root 27 14. Nov 22:50 systemd-journald.service -> ../systemd-journald.service
lrwxrwxrwx 1 root root 31 14. Nov 22:50 systemd-modules-load.service -> ../systemd-modules-load.service
lrwxrwxrwx 1 root root 30 14. Nov 22:50 systemd-random-seed.service -> ../systemd-random-seed.service
lrwxrwxrwx 1 root root 25 14. Nov 22:50 systemd-sysctl.service -> ../systemd-sysctl.service
lrwxrwxrwx 1 root root 37 14. Nov 22:50 systemd-tmpfiles-setup-dev.service -> ../systemd-tmpfiles-setup-dev.service
lrwxrwxrwx 1 root root 33 14. Nov 22:50 systemd-tmpfiles-setup.service -> ../systemd-tmpfiles-setup.service
lrwxrwxrwx 1 root root 31 14. Nov 22:50 systemd-udev-trigger.service -> ../systemd-udev-trigger.service
lrwxrwxrwx 1 root root 24 14. Nov 22:50 systemd-udevd.service -> ../systemd-udevd.service
lrwxrwxrwx 1 root root 30 14. Nov 22:50 systemd-update-utmp.service -> ../systemd-update-utmp.service
lrwxrwxrwx 1 root root 33 14. Nov 22:50 systemd-vconsole-setup.service -> ../systemd-vconsole-setup.service
lrwxrwxrwx 1 root root 17 22. Sep 13:44 var-lock.mount -> ../var-lock.mount
lrwxrwxrwx 1 root root 16 22. Sep 13:44 var-run.mount -> ../var-run.mount

Das Verzeichnis:
/var/run/mysql ---soll-zeigen-auf---> /run/mysql
wird aber bei Dir anscheinend nicht hergestellt im sysinit bootlevel.

[edit] Mein Debian~sid systemd-204 zeigt zb dies:
Code:
ls -ll /media/debian/lib/systemd/system/sysinit.target.wants/
total 0
lrwxrwxrwx 1 root root 20 23. Sep 13:44 cryptsetup.target -> ../cryptsetup.target
lrwxrwxrwx 1 root root 23 23. Sep 13:44 debian-fixup.service -> ../debian-fixup.service
lrwxrwxrwx 1 root root 22 23. Sep 13:44 dev-hugepages.mount -> ../dev-hugepages.mount
lrwxrwxrwx 1 root root 19 23. Sep 13:44 dev-mqueue.mount -> ../dev-mqueue.mount
lrwxrwxrwx 1 root root 36 23. Sep 13:44 proc-sys-fs-binfmt_misc.automount -> ../proc-sys-fs-binfmt_misc.automount
lrwxrwxrwx 1 root root 32 23. Sep 13:44 sys-fs-fuse-connections.mount -> ../sys-fs-fuse-connections.mount
lrwxrwxrwx 1 root root 26 23. Sep 13:44 sys-kernel-config.mount -> ../sys-kernel-config.mount
lrwxrwxrwx 1 root root 25 23. Sep 13:44 sys-kernel-debug.mount -> ../sys-kernel-debug.mount
lrwxrwxrwx 1 root root 36 23. Sep 13:44 systemd-ask-password-console.path -> ../systemd-ask-password-console.path
lrwxrwxrwx 1 root root 25 23. Sep 13:44 systemd-binfmt.service -> ../systemd-binfmt.service
lrwxrwxrwx 1 root root 32 23. Sep 13:44 systemd-journal-flush.service -> ../systemd-journal-flush.service
lrwxrwxrwx 1 root root 27 23. Sep 13:44 systemd-journald.service -> ../systemd-journald.service
lrwxrwxrwx 1 root root 31 23. Sep 13:44 systemd-modules-load.service -> ../systemd-modules-load.service
lrwxrwxrwx 1 root root 35 23. Sep 13:44 systemd-random-seed-load.service -> ../systemd-random-seed-load.service
lrwxrwxrwx 1 root root 25 23. Sep 13:44 systemd-sysctl.service -> ../systemd-sysctl.service
lrwxrwxrwx 1 root root 37 23. Sep 13:44 systemd-tmpfiles-setup-dev.service -> ../systemd-tmpfiles-setup-dev.service
lrwxrwxrwx 1 root root 33 23. Sep 13:44 systemd-tmpfiles-setup.service -> ../systemd-tmpfiles-setup.service
lrwxrwxrwx 1 root root 31 23. Sep 13:44 systemd-udev-trigger.service -> ../systemd-udev-trigger.service
lrwxrwxrwx 1 root root 24 23. Sep 13:44 systemd-udevd.service -> ../systemd-udevd.service


[edit 2] tmpfs und devtmpfs müssen in der Kernel .config activ sein um dies zu zeigen:
Code:
# mount|grep tmpfs
devtmpfs on /dev type devtmpfs (rw,relatime,size=1891940k,nr_inodes=472985,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
tmpfs on /tmp type tmpfs (rw)
Nur /tmp muss nicht sein.
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Fri Nov 22, 2013 5:12 pm    Post subject: Reply with quote

Die tmpfiles sind da:

Code:
tux Downloads # ls -ll /usr/lib/systemd/system/sysinit.target.wants/
insgesamt 0
lrwxrwxrwx 1 root root 22 14. Okt 20:12 dev-hugepages.mount -> ../dev-hugepages.mount
lrwxrwxrwx 1 root root 19 14. Okt 20:12 dev-mqueue.mount -> ../dev-mqueue.mount
lrwxrwxrwx 1 root root 28 14. Okt 20:12 kmod-static-nodes.service -> ../kmod-static-nodes.service
lrwxrwxrwx 1 root root 36 14. Okt 20:12 proc-sys-fs-binfmt_misc.automount -> ../proc-sys-fs-binfmt_misc.automount
lrwxrwxrwx 1 root root 32 14. Okt 20:12 sys-fs-fuse-connections.mount -> ../sys-fs-fuse-connections.mount
lrwxrwxrwx 1 root root 26 14. Okt 20:12 sys-kernel-config.mount -> ../sys-kernel-config.mount
lrwxrwxrwx 1 root root 25 14. Okt 20:12 sys-kernel-debug.mount -> ../sys-kernel-debug.mount
lrwxrwxrwx 1 root root 36 14. Okt 20:12 systemd-ask-password-console.path -> ../systemd-ask-password-console.path
lrwxrwxrwx 1 root root 25 14. Okt 20:12 systemd-binfmt.service -> ../systemd-binfmt.service
lrwxrwxrwx 1 root root 32 14. Okt 20:12 systemd-journal-flush.service -> ../systemd-journal-flush.service
lrwxrwxrwx 1 root root 27 14. Okt 20:12 systemd-journald.service -> ../systemd-journald.service
lrwxrwxrwx 1 root root 31 14. Okt 20:12 systemd-modules-load.service -> ../systemd-modules-load.service
lrwxrwxrwx 1 root root 30 14. Okt 20:12 systemd-random-seed.service -> ../systemd-random-seed.service
lrwxrwxrwx 1 root root 25 14. Okt 20:12 systemd-sysctl.service -> ../systemd-sysctl.service
lrwxrwxrwx 1 root root 37 14. Okt 20:12 systemd-tmpfiles-setup-dev.service -> ../systemd-tmpfiles-setup-dev.service
lrwxrwxrwx 1 root root 33 14. Okt 20:12 systemd-tmpfiles-setup.service -> ../systemd-tmpfiles-setup.service
lrwxrwxrwx 1 root root 31 14. Okt 20:12 systemd-udev-trigger.service -> ../systemd-udev-trigger.service
lrwxrwxrwx 1 root root 24 14. Okt 20:12 systemd-udevd.service -> ../systemd-udevd.service
lrwxrwxrwx 1 root root 30 14. Okt 20:12 systemd-update-utmp.service -> ../systemd-update-utmp.service
lrwxrwxrwx 1 root root 33 14. Okt 20:12 systemd-vconsole-setup.service -> ../systemd-vconsole-setup.service
lrwxrwxrwx 1 root root 17  1. Okt 22:31 var-lock.mount -> ../var-lock.mount
lrwxrwxrwx 1 root root 16  1. Okt 22:31 var-run.mount -> ../var-run.mount


systemd ist hier übrigens 208-r2....

/var/run/mysql habe ich nicht, nur /var/run/mysqld - und das ist leer....
Komisch scheinen mir hier die owner & groups:

Code:
ls -ali /var/run/
insgesamt 1036
 1128 drwxr-xr-x 26 root   root       640 20. Nov 17:52 .
    2 drwxr-xr-x 21 root   root      4096 13. Okt 12:52 ..
10644 drwxr-xr-x  2 root   root        80 20. Nov 17:49 ConsoleKit
 7418 drwxr-xr-x  2 root   root        40 20. Nov 17:46 NetworkManager
 1964 drwx--x---  2 root   apache      40 20. Nov 17:45 apache2
 1965 drwxr-xr-x  2 root   root        40 20. Nov 17:45 apache_ssl_mutex
 1966 drwx--x---  2 clamav clamav      40 20. Nov 17:45 clamav
 8472 -rw-r--r--  1 root   root         4 20. Nov 17:46 cron.pid
 5667 drwxr-xr-x  3 root   lp          80 20. Nov 17:46 cups
 5671 drwxr-xr-x  2 root   root        60 20. Nov 17:45 dbus
 6362 drwxr-xr-x  3 root   root        60 20. Nov 17:46 dhcpcd                                                       
 8521 -rw-r--r--  1 root   root   1038188 22. Nov 17:46 dhcpcd.pid                                                   
 8525 srw-rw----  1 root   root         0 20. Nov 17:46 dhcpcd.sock                                                 
 7399 -rw-r--r--  1 root   root         4 20. Nov 17:46 kdm.pid                                                     
 1238 drwxr-xr-x  4 root   root        80 22. Nov 03:10 lock                                                         
 1347 drwxr-xr-x  2 root   root        40 20. Nov 17:45 log                                                         
 1968 drwx------  2 root   root        40 20. Nov 17:45 lvm                                                         
16823 drwxr-xr-x  3 root   root        60 20. Nov 17:52 media                                                       
 5009 drwxr-xr-x  2 root   root        80 20. Nov 17:52 mount                                                       
 1969 drwxr-xr-x  2 mysql  mysql       40 21. Nov 20:43 mysqld                                                       
 6357 drwxr-xr-x  4 root   root        80 20. Nov 17:46 resolvconf                                                   
 1970 drwxr-xr-x  2 root   root        40 20. Nov 17:45 samba                                                       
 1967 drwxr-xr-x  2 root   root        40 20. Nov 17:45 saslauthd                                                   
 9066 -rw-r--r--  1 root   root         4 20. Nov 17:46 spamd.pid
 1144 drwxr-xr-x 13 root   root       320 21. Nov 21:50 systemd
 5172 drwxr-xr-x  2 root   root        60 20. Nov 17:45 tmpfiles.d
 1376 drwxr-xr-x  7 root   root       180 20. Nov 17:52 udev
11594 drwx------  2 root   root        60 20. Nov 17:52 udisks2
 1971 drwxr-xr-x  3 root   root        60 20. Nov 17:49 user
 1972 -rw-rw-r--  1 root   utmp      1920 20. Nov 17:50 utmp
 7405 drwxr-xr-x  2 root   root        60 20. Nov 17:49 xauth
 7401 drwxr-xr-x  4 root   root        80 20. Nov 17:46 xdmct


clamav.service läuft nämlich auch nicht hier.

Mit den tmpfs bin ich auch bei dir:

Code:
tux Downloads # mount|grep tmpfs
devtmpfs on /dev type devtmpfs (rw,relatime,size=8182824k,nr_inodes=2045706,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
tmpfs on /tmp type tmpfs (rw)


Die MYSQL-Logs sind (für heute) allerdings leer, obwohl mysql auch heute noch mit der gleichen Fehlermeldung den Start verweigert...?!

Danke für deine Hilfe, mit mysql kenne ich mich noch gar nicht aus. Da ich aber in amarok und digikam jeweils über 54.000 Einträge verwalte, wäre mysql (hoffentlich) schneller als die integrierte SQLite...



uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Fri Nov 22, 2013 6:59 pm    Post subject: Reply with quote

Der mysql daemon muss natürlich als user "mysql" laufen, sonst kann er nicht schreiben in /var/run/mysqld (siehe Berechtigungen)
Hast Du ihn initialisier? Muss man doch? Ich lass mysql-von-mariadb embedded als meinen user laufen. Da gibt es keine Schwierigkeiten.

[edit]Bei mir geht alles (Ich habe glaube ich, nie etwas initialisiert)
Code:
Nov 22 20:00:46 maci systemd[1]: Starting MySQL database server...
Nov 22 20:00:46 maci mysqld_safe[2878]: 131122 20:00:46 mysqld_safe Logging to '/var/log/mysql/mysqld.err'.
Nov 22 20:00:46 maci mysqld_safe[2878]: 131122 20:00:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Nov 22 20:00:50 maci systemd[1]: Started MySQL database server.
Nov 22 20:02:01 maci systemd[1]: Stopping MySQL database server...
Nov 22 20:02:02 maci mysqld_safe[2878]: 131122 20:02:02 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Nov 22 20:02:02 maci systemd[1]: Stopped MySQL database server.
Nov 22 20:02:14 maci systemd[1]: Stopped MySQL database server.
 maci etc # systemctl enable mysqld
ln -s '/usr/lib64/systemd/system/mysqld.service' '/etc/systemd/system/multi-user.target.wants/mysqld.service'
 maci etc # systemctl disable mysqld
rm '/etc/systemd/system/multi-user.target.wants/mysqld.service'
Zur Not: probiers mit mariadb!
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Fri Nov 22, 2013 7:15 pm    Post subject: Reply with quote

initialisiert habe ich jetzt, nachdem ich /var/lib/mysql wie von Finswimmer vorgeschlagen komplett gelöscht habe. Das lief auch ohne Fehlermeldung...

Nach einem restart mit systemctl enable mysql habe ich im mysqld.err das hier stehen:

Code:
131121 20:43:13 [Note] //usr/sbin/mysqld: ready for connections.
Version: '5.1.70'  socket: '//var/run/mysqld/mysqld20275.sock'  port: 0  Gentoo Linux mysql-5.1.70
131121 20:43:15 [Note] //usr/sbin/mysqld: Normal shutdown

131121 20:43:15 [Note] //usr/sbin/mysqld: Shutdown complete


Kann es sein, das der socket eine andere Version ist?

Code:


[code][/code]tux uhai # ps aux | grep mysql
uhai      2742  0.0  0.2 2260924 41436 ?       Sl   Nov20   1:01 /usr/sbin/mysqld --defaults-file=/home/uhai/.local/hare/akonadi/mysql.conf --datadir=/home/uhai/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-uhai.Ar981z/mysql.scket
root     24326  0.0  0.0  13108   964 pts/1    S+   20:24   0:00 grep --colour=auto mysql

Also läuft mysqld doch für akonadi....?

Das sind die defaults hier:

Code:
tux uhai # /usr/sbin/mysqld --print-defaults
/usr/sbin/mysqld would have been started with the following arguments:
--character-set-server=utf8 --user=mysql --port=3306 --socket=/var/run/mysqld/mysqld.sock --pid-file=/var/run/mysqld/mysqld.pid --log-error=/var/log/mysql/mysqld.err --basedir=/usr --datadir=/var/lib/mysql --skip-external-locking --key_buffer=16M --max_allowed_packet=1M --table_open_cache=64 --sort_buffer_size=512K --net_buffer_length=8K --read_buffer_size=256K --read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M --language=/usr/share/mysql/english --bind-address=127.0.0.1 --log-bin --server-id=1 --tmpdir=/tmp/ --innodb_buffer_pool_size=16M --innodb_additional_mem_pool_size=2M --innodb_data_file_path=ibdata1:10M:autoextend:max:128M --innodb_log_file_size=5M --innodb_log_buffer_size=8M --innodb_log_files_in_group=2 --innodb_flush_log_at_trx_commit=1 --innodb_lock_wait_timeout=50 --innodb_file_per_table


Der sucht einen anderen socket, oder?: /var/run/mysqld/mysqld.sock statt /var/run/mysqld/mysqld20275.sock

Kann das der Grund sein?

uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Sat Nov 23, 2013 1:34 am    Post subject: Reply with quote

uhai wrote:
initialisiert habe ich jetzt, nachdem ich /var/lib/mysql wie von Finswimmer vorgeschlagen komplett gelöscht habe.

Grund für was für ein Problem: Jetzt läuft mysqld doch, Finswimmer hatte also Recht...

Wie du das jetzt mit Akonadi user seitige gebacken bekommst, ist doch ein neues Problem und hat nichts mit dem Thread title mehr zu tun.
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Sat Nov 23, 2013 7:27 am    Post subject: Reply with quote

Akonadi läuft, mein Problem ist, dass ich mich nicht einloggen kann, um neue Datenbanken für amarok und digikam anzulegen. Und der Fehler ist immer noch der socket.

Eventuell habe ich ja in 2 Slots installiert,...die unterschiedliche Sockets ansprechen??

Sehe ich das richtig, mariadb ist der opensource-Zweig von mysql? das kann ich einfach austauschen?

Code:

tux Downloads # ls /etc/env.d/
00basic                    20ant             44qca2                60python-docs-2.7    98ca-certificates    cblas
00glibc                    20java-config     44qt4                 60python-docs-3.2    98texlive            gcc
02locale                   20php5.5          44qt4-emul            70less               99R                  lapack
03opencl                   22javacc          44qt4-graphicssystem  77kde                99cuda               python
03opengl                   30gnupg           50gconf               80mercurial          99gentoolkit-env
04gcc-x86_64-pc-linux-gnu  30xdg-data-local  50guile               80subversion-extras  99hylafaxplus-5.5.1
05binutils                 35hsqldb          50ncurses             90games              99skype
09sandbox                  37fontconfig      50slib                90nss                binutils
10rubygems                 43kdepaths        60ladspa              90xdg-data-base      blas


Müsste mysql hier nicht auch vertreten sein? Zumindest habe ich eine thread ergoogelt, der das behauptet...
uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Sat Nov 23, 2013 10:50 am    Post subject: Reply with quote

a) Soweit ich sehe, ist dieses Dein erstes Teilproblem, nachdem du diesen Thread genannt hast, gelöst:
Code:
mysqld.service        loaded failed failed    MySQL database server

b) mariadb - mysql __Verhältnis_ist_gleich__ libreoffice - openoffice
Aber die Lizenz ist gleich, wenn du dir anschaust: equery m mysql
c) Da du nicht embedded user mysql laufen lassen willst, musst Du jetzt den deinen auf System Ebene laufenden mysql Daimon so konfigurieren, dass deine User Konten zugreifen können dürfen! Da gibt es verschiedene Level:
- Mysql Benutzer darf neue Datenbanken anlegen
- Benutzer darf Datenbank Einträge hinzufügen ....
Soweit ich mich erinnere musst Du Benutzer und deren Passwörter für mysql definieren.
Einfach mal schauen, welche Hilfe es in den Manuals gibt:
man mysql
man mysqld
Einstellmöglichkeiten siehst du mit portage-utils:
Code:
qlist mysql|grep etc

Oder das Wiki: http://userbase.kde.org/Tutorials/Shared_Database/de
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Sat Nov 23, 2013 12:11 pm    Post subject: Reply with quote

Die Konfiguration nach dem emerge habe ich gemacht und ein Passwort für root vergeben. Dann sollte root in der Konsole mysql aufrufen können. auch die Passwort-Eingabe funktioniert. Nur den Connect zum socket habe ich (als root) nicht....
systemctl zeigt imemr noch:

Code:
mysqld.service                                loaded failed failed    MySQL database server


Mir scheint das kein Rechte-Problem des users zu sein, sondern ein Konfigurationsproblem von mysql. Akonadi verwendet auch einen anderen socket. In der my.cnf ist allerdings exakt der socket definert, den mysql nicht findet und der auch nicht existiert...

Wie kann ich den socket wiederherstellen?

uhai
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1483

PostPosted: Sat Nov 23, 2013 3:21 pm    Post subject: Reply with quote

uhai wrote:
zeigt imemr noch:

Code:
mysqld.service                                loaded failed failed    MySQL database server

Uuups, ich dachte das wäre geklärt.
Sorry, weiss keinen anderen Rat: mariadb versuchen?
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Sat Nov 23, 2013 4:48 pm    Post subject: Reply with quote

Never touch a running system: Nachdem Akonadi jetzt mal läuft - kann ich mysql und mariadb parallel behalten? Wohl eher nicht, oder?

Läuft Akonadi auch mit mariadb? digikam und amrok wären mir auch wichtig...

Wäre das der richtige Weg zu maria:

- keyworded dev-db/mariadb & virtual/mysql-5.5
- remove mysql
- emerge mariadb
- revdep-rebuild
- mysql_upgrade
- etc-update

Oder habe ich da etwas vergessen?

uhai
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1397
Location: Eppingen, Germany

PostPosted: Sat Nov 23, 2013 6:52 pm    Post subject: Reply with quote

mit mariadb sieht das auch nicht besser aus:

Code:
systemctl enable mysqld.service
tux Downloads # mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


In der my.cnf ist eine bind address =127.0.0.1 bzw. localhost angegeben. Und ein port... Könnte ich ein Problem mit der firewall auf meinem Router haben? Der Mysql-Server soll auf dem Rechner laufen, an dessen Tastatur ich mich hier abmühe.... brauche ich eigentlich den Router nicht, oder?

uhai
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4693
Location: Germany

PostPosted: Sat Nov 23, 2013 7:50 pm    Post subject: Reply with quote

uhai wrote:
mit mariadb sieht das auch nicht besser aus:

Code:
systemctl enable mysqld.service
tux Downloads # mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
....

uhai, beachte das du mit "systemctl enable mysqld.service" den Dienst nicht wirklich startest (das würde erst mit dem nächsten reboot geschehen)
Versuch mal
Code:
systemctl start mysqld
systemctl status mysqld
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum