1) not having ~/.my.cnf # emerge --config mariadb Configuring pkg... * Please provide a password for the mysql 'root' user now * or through the /root/.my.cnf file. * Avoid ["'\_%] characters in the password > * Retype the password > * Creating the mysql database and setting proper permissions on it ... * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr' --user=mysql '--datadir=///var/lib/mysql' '--tmpdir=///tmp/' * Starting mysqld ... * Command //usr/sbin/mysqld --user=mysql --user=mysql --log-warnings=0 --basedir=//usr --datadir=///var/lib/mysql --max_allowed_packet=8M --net_buffer_length=16K --default-storage-engine=MyISAM --socket=//var/run/mysqld/mysqld25077.sock --pid-file=//var/run/mysqld/mysqld11911.pid * --tmpdir=///tmp/ .2015-10-26 19:27:28 140101053798272 [Note] //usr/sbin/mysqld (mysqld 10.1.8-MariaDB-log) starting as process 15732 ... [ ok ] * Setting root password ... [ ok ] * Loading "zoneinfo", this step may require a few seconds ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ ok ] * Failed to load zoneinfo! * Stopping the server ... * Done 2) having ~/.my.cnf: # cat /root/.my.cnf [mysql] user=root password=root # emerge --config mariadb Configuring pkg... * Creating the mysql database and setting proper permissions on it ... * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr' --user=mysql '--datadir=///var/lib/mysql' '--tmpdir=///tmp/' * Starting mysqld ... * Command //usr/sbin/mysqld --user=mysql --user=mysql --log-warnings=0 --basedir=//usr --datadir=///var/lib/mysql --max_allowed_packet=8M --net_buffer_length=16K --default-storage-engine=MyISAM --socket=//var/run/mysqld/mysqld19497.sock --pid-file=//var/run/mysqld/mysqld9731.pid * --tmpdir=///tmp/ .2015-10-26 19:28:20 140426909017984 [Note] //usr/sbin/mysqld (mysqld 10.1.8-MariaDB-log) starting as process 16165 ... [ ok ] * Setting root password ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ !! ] * Loading "zoneinfo", this step may require a few seconds ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ ok ] * Failed to load zoneinfo! * Stopping the server ... * Done
Portage 2.2.23 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.1.6-gentoo x86_64) ================================================================= System uname: Linux-4.1.6-gentoo-x86_64-Intel-R-_Core-TM-_i5-3570_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 16327540 total, 10967828 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Mon, 26 Oct 2015 12:15:01 +0000 sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo, 3.5.0-r1::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.18::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-mtune=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-mtune=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://tux.rainside.sk/gentoo/" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv jpeg lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl seccomp session sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="access_compat authn_core authz_core authz_host dir mime unixd socache_shmcb log_config rewrite vhost_alias log_forensic proxy proxy_fcgi info status deflate filter auth_digest authn_file authz_user actions alias auth_basic authn_alias authn_anon env expires headers mime_magic negotiation reqtimeout setenvif unique_id version cgi http2" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 xen pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-0 php5-6 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON # emerge -pvq mariadb [ebuild R ] dev-db/mariadb-10.1.8 USE="community cracklib extraengine jemalloc openssl pam server tokudb tools xml -bindist -client-libs (-cluster) -debug -embedded -galera -innodb-lz4 -innodb-lzo -innodb-snappy -latin1 -libressl -mroonga -odbc -oqgraph -perl -profiling (-selinux) -sphinx -sst-rsync -sst-xtrabackup -static -static-libs -systemd -systemtap -tcmalloc {-test} -yassl" ABI_X86="32 (64) (-x32)"
*** Bug 564724 has been marked as a duplicate of this bug. ***
Fixed in tree
It's not working for me. I set up the password in ~/.my.cnf and: # emerge --config mariadb Configuring pkg... * Creating the mysql database and setting proper permissions on it ... * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr' --user=mysql '--datadir=///var/lib/mysql' '--tmpdir=///tmp/' * Starting mysqld ... * Command //usr/sbin/mysqld --user=mysql --user=mysql --log-warnings=0 --basedir=//usr --datadir=///var/lib/mysql --max_allowed_packet=8M --net_buffer_length=16K --default-storage-engine=MyISAM --socket=//var/run/mysqld/mysqld3800.sock --pid-file=//var/run/mysqld/mysqld16427.pid * --tmpdir=///tmp/ .2015-11-09 7:33:46 140519992723328 [Note] //usr/sbin/mysqld (mysqld 10.1.8-MariaDB-log) starting as process 7135 ... [ ok ] * Setting root password ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ !! ] * Loading "zoneinfo", this step may require a few seconds ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ ok ] * Failed to load zoneinfo! * Stopping the server ... * Done # /etc/init.d/mysql restart * Stopping mysql ... [ ok ] * Checking mysqld configuration for mysql ... [ ok ] * Starting mysql ... [ ok ] # mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
(In reply to Tomas Mozes from comment #4) > It's not working for me. I set up the password in ~/.my.cnf and: > > # emerge --config mariadb > Did you rebuild MariaDB? The instructions are cached until you do.
I didn't know that, however I just tried with 10.1.9 with no luck. 1) not using /root/.my.cnf => can login with user/pass, but Access denied when loading zoneinfo? # emerge --config =dev-db/mariadb-10.1.9 Configuring pkg... * Please provide a password for the mysql 'root' user now * or through the /root/.my.cnf file. * Avoid ["'\_%] characters in the password > * Retype the password > * Creating the mysql database and setting proper permissions on it ... * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr' --user=mysql '--datadir=///var/lib/mysql' '--tmpdir=///tmp/' * Starting mysqld ... * Command //usr/sbin/mysqld --user=mysql --user=mysql --log-warnings=0 --basedir=//usr --datadir=///var/lib/mysql --max_allowed_packet=8M --net_buffer_length=16K --default-storage-engine=MyISAM --socket=//var/run/mysqld/mysqld13545.sock --pid-file=//var/run/mysqld/mysqld11897.pid * --tmpdir=///tmp/ .2015-11-24 8:16:34 139647614711680 [Note] //usr/sbin/mysqld (mysqld 10.1.9-MariaDB-log) starting as process 27853 ... [ ok ] * Setting root password ... [ ok ] * Loading "zoneinfo", this step may require a few seconds ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ ok ] * Failed to load zoneinfo! * Stopping the server ... * Done 2) using /root/.my.cnf => can only login with empty password even though a password was set in the configuration # emerge --config =dev-db/mariadb-10.1.9 Configuring pkg... * Creating the mysql database and setting proper permissions on it ... * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr' --user=mysql '--datadir=///var/lib/mysql' '--tmpdir=///tmp/' * Starting mysqld ... * Command //usr/sbin/mysqld --user=mysql --user=mysql --log-warnings=0 --basedir=//usr --datadir=///var/lib/mysql --max_allowed_packet=8M --net_buffer_length=16K --default-storage-engine=MyISAM --socket=//var/run/mysqld/mysqld7860.sock --pid-file=//var/run/mysqld/mysqld24091.pid * --tmpdir=///tmp/ .2015-11-24 8:18:13 139868237354880 [Note] //usr/sbin/mysqld (mysqld 10.1.9-MariaDB-log) starting as process 28318 ... [ ok ] * Setting root password ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ !! ] * Loading "zoneinfo", this step may require a few seconds ... ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [ ok ] * Failed to load zoneinfo! * Stopping the server ... * Done
Just tested with Mariadb 10.0.22 (by setting both [mysql] and [client] in ~/.my.cnf), the installation goes without an error, but cannot login with the root password. # emerge --config mariadb Configuring pkg... * Creating the mysql database and setting proper permissions on it ... * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr' --loose-skip-grant-tables --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start --loose-skip-ssl --loose-skip-log-bin --loose-skip-relay-log --loose-skip-slow-query-log --loose-skip-external-locking --loose-skip-log-slave-updates --user=mysql '--datadir=///var/lib/mysql' '--tmpdir=///tmp/' * Starting mysqld ... * Command //usr/sbin/mysqld --loose-skip-grant-tables --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start --loose-skip-ssl --loose-skip-log-bin --loose-skip-relay-log --loose-skip-slow-query-log --loose-skip-external-locking --loose-skip-log-slave-updates --user=mysql --user=mysql --log-warnings=0 --basedir=//usr --datadir=///var/lib/mysql --max_allowed_packet=8M --net_buffer_length=16K --default-storage-engine=MyISAM --socket=//var/run/mysqld/mysqld1658.sock --pid-file=//var/run/mysqld/mysqld13244.pid * --tmpdir=///tmp/ .160107 11:49:27 [Note] //usr/sbin/mysqld (mysqld 10.0.22-MariaDB) starting as process 17768 ... [ ok ] * Setting root password ... [ ok ] * Loading "zoneinfo", this step may require a few seconds ... [ ok ] * Stopping the server ... * Done # /etc/init.d/mysql restart * Checking mysqld configuration for mysql ... [ ok ] * Starting mysql ... # mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Just tested with MariaDB 10.1.12, still the same.
@ Tomáš: I am currently working on bug 510724 which looks similar. Can you please show me the _complete_ unchanged and unfiltered output of `/usr/bin/my_print_defaults client mysql` on your system?
I have committed a fix for bug https://bugs.gentoo.org/show_bug.cgi?id=510724#c4. I am closing this with a TEST-REQUEST because I assume that the fix from bug 510724 also fixes the issue reported in this bug.
(In reply to Thomas Deutschmann from comment #9) > @ Tomáš: > > I am currently working on bug 510724 which looks similar. > > Can you please show me the _complete_ unchanged and unfiltered output of > `/usr/bin/my_print_defaults client mysql` on your system? # /usr/bin/my_print_defaults client mysql --port=3306 --socket=/var/run/mysqld/mysqld.sock --character-sets-dir=/usr/share/mysql/charsets --default-character-set=utf8 --user=root --password=pass --user=root --password=pass
Tested with MariaDB 10.1.17, it works properly now :) Thanks Thomas!