Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mySQL fails to start
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3667

PostPosted: Fri Jan 10, 2025 4:33 am    Post subject: mySQL fails to start Reply with quote

Hi, ALL,
Code:

 * Making Convenience links for mysqlcheck multi-call binary
 * Building default configuration ...
 * Adjusting to prefix /
 *   my.cnf ...                                                                                  [ ok ]
 * Adjusting to prefix /
 *   50-distro-client.cnf ...                                                                    [ ok ]
 * Adjusting to prefix /
 *   my.cnf.ok ...                                                                               [ ok ]
>>> Completed installing dev-db/mysql-5.7.41 into /var/tmp/portage/dev-db/mysql-5.7.41/image

 * Final size of build directory: 854456 KiB (834.4 MiB)
 * Final size of installed tree:  139912 KiB (136.6 MiB)

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/lib64/mysql/plugin/ha_example.so
   /usr/bin/myisam_ftdump
   /usr/bin/myisamlog
   /usr/bin/myisamchk
   /usr/bin/myisampack
   /usr/lib64/mysql/plugin/adt_null.so
   /usr/lib64/mysql/plugin/test_security_context.so
   /usr/lib64/mysql/plugin/auth.so
   /usr/lib64/mysql/plugin/auth_test_plugin.so
   /usr/lib64/mysql/plugin/qa_auth_interface.so
   /usr/lib64/mysql/plugin/qa_auth_server.so
   /usr/lib64/mysql/plugin/qa_auth_client.so
   /usr/lib64/mysql/plugin/mysql_no_login.so
   /usr/lib64/mysql/plugin/auth_socket.so
   /usr/lib64/mysql/plugin/connection_control.so
   /usr/lib64/mysql/plugin/libdaemon_example.so
   /usr/lib64/mysql/plugin/mypluglib.so
   /usr/lib64/mysql/plugin/keyring_file.so
   /usr/lib64/mysql/plugin/validate_password.so
   /usr/lib64/mysql/plugin/replication_observers_example_plugin.so
   /usr/lib64/mysql/plugin/rewrite_example.so
   /usr/lib64/mysql/plugin/rewriter.so
   /usr/lib64/mysql/plugin/semisync_master.so
   /usr/lib64/mysql/plugin/semisync_slave.so
   /usr/lib64/mysql/plugin/libtest_session_in_thd.so
   /usr/lib64/mysql/plugin/libtest_x_sessions_init.so
   /usr/lib64/mysql/plugin/libtest_x_sessions_deinit.so
   /usr/lib64/mysql/plugin/libtest_session_detach.so
   /usr/lib64/mysql/plugin/libtest_session_info.so
   /usr/lib64/mysql/plugin/libtest_sql_complex.so
   /usr/lib64/mysql/plugin/libtest_sql_all_col_types.so
   /usr/lib64/mysql/plugin/libtest_sql_2_sessions.so
   /usr/lib64/mysql/plugin/libtest_sql_cmds_1.so
   /usr/lib64/mysql/plugin/libtest_sql_processlist.so
   /usr/lib64/mysql/plugin/libtest_sql_shutdown.so
   /usr/lib64/mysql/plugin/libtest_sql_views_triggers.so
   /usr/lib64/mysql/plugin/libtest_sql_stored_procedures_functions.so
   /usr/lib64/mysql/plugin/libtest_sql_commit.so
   /usr/lib64/mysql/plugin/libtest_sql_lock.so
   /usr/lib64/mysql/plugin/libtest_sql_sqlmode.so
   /usr/lib64/mysql/plugin/libtest_sql_replication.so
   /usr/lib64/mysql/plugin/libtest_sql_errors.so
   /usr/lib64/mysql/plugin/libtest_framework.so
   /usr/lib64/mysql/plugin/libtest_services.so
   /usr/lib64/mysql/plugin/libtest_services_threaded.so
   /usr/lib64/mysql/plugin/test_udf_services.so
   /usr/lib64/mysql/plugin/version_token.so
   /usr/bin/resolveip
   /usr/bin/replace
   /usr/bin/innochecksum
   /usr/bin/resolve_stack_dump
   /usr/lib64/libmysqlservices.a
   /usr/bin/mysql
   /usr/bin/mysql_upgrade
   /usr/bin/mysqltest
   /usr/bin/mysqlcheck
   /usr/bin/mysqlimport
   /usr/bin/mysqldump
   /usr/bin/mysqlshow
   /usr/bin/mysql_plugin
   /usr/bin/mysqlbinlog
   /usr/bin/mysqladmin
   /usr/bin/mysqlslap
   /usr/bin/mysql_config_editor
   /usr/bin/mysql_secure_installation
   /usr/bin/mysql_install_db
   /usr/bin/mysql_ssl_rsa_setup
   /usr/bin/mysql_client_test
   /usr/bin/mysqlpump
   /usr/sbin/mysqld
   /usr/bin/mysql_tzinfo_to_sql
   /usr/lib64/mysql/plugin/udf_example.so
   /usr/lib64/mysql/plugin/locking_service.so

>>> Installing (1 of 1) dev-db/mysql-5.7.41::gentoo
 *
 * If you are upgrading major versions, you should run the
 * mysql_upgrade tool.
 *
 *
 * This version of mysql reorganizes the configuration from a single my.cnf
 * to several files in /etc/mysql/mysql.d.
 * Please backup any changes you made to /etc/mysql/my.cnf
 * and add them as a new file under /etc/mysql/mysql.d with a .cnf extension.
 * You may have as many files as needed and they are read alphabetically.
 * Be sure the options have the appropriate section headers, i.e. [mysqld].
 *

>>> Completed (1 of 1) dev-db/mysql-5.7.41::gentoo

 * Messages for package dev-db/mysql-5.7.41:

 * If you are upgrading major versions, you should run the
 * mysql_upgrade tool.
 * This version of mysql reorganizes the configuration from a single my.cnf
 * to several files in /etc/mysql/mysql.d.
 * Please backup any changes you made to /etc/mysql/my.cnf
 * and add them as a new file under /etc/mysql/mysql.d with a .cnf extension.
 * You may have as many files as needed and they are read alphabetically.
 * Be sure the options have the appropriate section headers, i.e. [mysqld].

 * GNU info directory index is up-to-date.

 * IMPORTANT: config file '/etc/portage/package.keywords' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
WaylandGnome /home/igor/dbhandler/Debug # emerge --config =dev-db/mysql-5.7.41
/usr/lib/python3.11/site-packages/portage/package/ebuild/_config/KeywordsManager.py:86: UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead
  warnings.warn(


Configuring pkg...


 * Detected settings:
 * ==================
 * MySQL User:            mysql
 * MySQL Group:            mysql
 * MySQL DATA directory:      /var/lib/mysql
 * MySQL TMP directory:         /tmp
 * PID DIR:            /run/mysqld
 * Install db log:         /tmp/install_db.132111251.log
 * Install server log:         /tmp/install_mysqld.111139211.log
 * Trying to get password for mysql 'root' user from 'mysql' section ...
 * Trying to get password for mysql 'root' user from 'client' section ...

 * No password for mysql 'root' user was specified via environment
 * variable MYSQL_ROOT_PASSWORD and no password was found in config
 * file like '/root/.my.cnf'.
 * To continue please provide a password for the mysql 'root' user
 * now on console:
 * NOTE: Please avoid ["'\_%] characters in the password!
    >
 * Retype the password
    >

 * Initializing mysql data directory: /usr/sbin/mysqld --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start --loose-skip-federated --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 --initialize-insecure --init-file='/tmp/tz.125623213.sql' --basedir='/usr' --datadir='/var/lib/mysql' --tmpdir='/tmp' --log-error='/tmp/install_db.132111251.log' --user=mysql
/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3774: /tmp/install_db.132111251.log: Permission denied
 * ERROR: dev-db/mysql-5.7.41::gentoo failed (config phase):
 *   Failed to initialize mysql data directory. Please review '/tmp/install_db.132111251.log'!
 *
 * Call stack:
 *     ebuild.sh, line 136:  Called pkg_config
 *   environment, line 3777:  Called die
 * The specific snippet of code:
 *           die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!";
 *
 * If you need support, post the output of `emerge --info '=dev-db/mysql-5.7.41::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-5.7.41::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.7.41/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/mysql-5.7.41/empty'
 * S: '/var/tmp/portage/dev-db/mysql-5.7.41/work/mysql-5.7.41'

WaylandGnome /home/igor/dbhandler/Debug # rc-service mysql start
 * Checking mysqld configuration for mysql ...                                                    [ ok ]
 * Starting mysql ...
 * You don't appear to have a server package installed yet.
 * ERROR: mysql failed to start
WaylandGnome /home/igor/dbhandler/Debug #


What could be the issue?

It seems to compile and install OK, but configuring/starting fails...

Thank you.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2592

PostPosted: Fri Jan 10, 2025 4:56 am    Post subject: Reply with quote

It would be nice if you look at what portage tells you, if not to try to figure it out on your own, at least to help your helpers:

Code:
 * ERROR: dev-db/mysql-5.7.41::gentoo failed (config phase):
 *   Failed to initialize mysql data directory. Please review '/tmp/install_db.132111251.log'!


Best Regards,
Georgi
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1830
Location: Germany

PostPosted: Fri Jan 10, 2025 6:31 am    Post subject: Reply with quote

Quote:
/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3774: /tmp/install_db.132111251.log: Permission denied


As which user do you run the emerge command? And please tell us the exact command you did use.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2592

PostPosted: Fri Jan 10, 2025 9:48 am    Post subject: Reply with quote

Banana wrote:
Quote:
/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3774: /tmp/install_db.132111251.log: Permission denied


As which user do you run the emerge command? And please tell us the exact command you did use.


To my knowledge, it should run under mysql user, so I suspect incorrect permissions on /tmp.

Best Regards,
Georgi
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3667

PostPosted: Sat Jan 11, 2025 5:40 am    Post subject: Reply with quote

Hi,
logrusx wrote:

It would be nice if you look at what portage tells you, if not to try to figure it out on your own, at least to help your helpers:

Code:

 * ERROR: dev-db/mysql-5.7.41::gentoo failed (config phase):
 *   Failed to initialize mysql data directory. Please review '/tmp/install_db.132111251.log'!


Best Regards,
Georgi


Code:

WaylandGnome /home/igor/wx_copy # ls -la /tmp/
total 3252
drwxrwxrwt 11 root    root       4096 Jan 10 23:02 .
drwxr-xr-x 21 root    root       4096 Aug 21  2021 ..
srwxrwxrwx  1 igor    igor          0 Nov 16 20:02 dbus-eIgntLHEHI
srwxr-xr-x  1 igor    igor          0 Jan 10 23:02 dbus-HYfsw2T1
srw-rw-rw-  1 root    root          0 Nov 16 20:02 dbus-UKItl7V9
srw-rw-rw-  1 root    root          0 Nov 16 20:02 dbus-yflt0M4U
drwx------  2 igor    igor       4096 Dec  4 21:14 dhcpcd-igor
drwxrwxrwt  2 root    root       4096 Nov 16 20:01 .font-unix
-rw-------  1 igor    igor          1 Dec 12 21:54 garbage0yyrfS
-rw-------  1 igor    igor       1806 Dec 12 22:45 garbagejUwP3J
-rw-------  1 igor    igor       1806 Dec 12 21:54 garbageloGVlM
-rw-------  1 igor    igor          2 Dec 12 22:45 garbageqBb0Xk
-rw-------  1 igor    igor         42 Dec 12 22:45 garbager5B2br
-rw-------  1 igor    igor          1 Dec 12 22:45 garbagesVQFmz
-rw-------  1 igor    igor          6 Dec 12 22:45 garbageU66hEm
-rw-------  1 igor    igor          2 Dec 12 21:54 garbageWwaFAj
-rw-------  1 igor    igor         42 Dec 12 21:54 garbagex5pvUh
-rw-------  1 igor    igor          6 Dec 12 21:54 garbagexGFlFz
drwxrwxrwt  2 root    root       4096 Nov 16 20:02 .ICE-unix
-rw-r--r--  1 mysql   root          0 Jan  9 22:28 install_db.132111251.log
-rw-r--r--  1 mysql   root          0 Jan  9 20:37 install_db.361811321.log
-rw-r--r--  1 mysql   root          0 Jan  9 22:28 install_mysqld.111139211.log
-rw-r--r--  1 mysql   root          0 Jan  9 20:37 install_mysqld.511323115.log
drwxrwxr-x  2 portage portage    4096 Nov 16 20:01 portage
drwx------  2 igor    igor       4096 Nov 16 20:02 ssh-XXXXXXyKGW0K
drwx------  2 igor    igor       4096 Dec 20 12:13 Temp-204e4dce-7ae7-4061-98a7-02c745548045
-rw-r--r--  1 root    root    1620537 Jan  9 22:28 tz.125623213.sql
-rw-r--r--  1 root    root    1620537 Jan  9 20:37 tz.151231311.sql
drwx------  2 igor    igor       4096 Nov 29 09:23 .vbox-igor-ipc
srwxr-xr-x  1 root    root          0 Nov 16 20:02 wpa_ctrl_1707-1
drwxrwxrwt  2 root    root       4096 Nov 16 20:02 .X11-unix
drwxrwxrwt  2 root    root       4096 Nov 16 20:01 .XIM-unix
WaylandGnome /home/igor/wx_copy #


Looks like the file is not created...

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3667

PostPosted: Sat Jan 11, 2025 5:44 am    Post subject: Reply with quote

Hi,
Banana wrote:

Quote:
/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3774: /tmp/install_db.132111251.log: Permission denied


As which user do you run the emerge command? And please tell us the exact command you did use.


I ran it under "root".
And the command was:

emerge --config =dev-db/mysql-5.7.41

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3667

PostPosted: Sat Jan 11, 2025 5:48 am    Post subject: Reply with quote

Hi,
logrusx wrote:

Banana wrote:

Quote:

/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3774: /tmp/install_db.132111251.log: Permission denied


As which user do you run the emerge command? And please tell us the exact command you did use.


To my knowledge, it should run under mysql user, so I suspect incorrect permissions on /tmp.

Best Regards,
Georgi


WiKi setup guide doesn't say anything about running it under any user other than root...

Thank you.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2592

PostPosted: Sat Jan 11, 2025 6:33 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Hi,
logrusx wrote:

Banana wrote:

Quote:

/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3774: /tmp/install_db.132111251.log: Permission denied


As which user do you run the emerge command? And please tell us the exact command you did use.


To my knowledge, it should run under mysql user, so I suspect incorrect permissions on /tmp.

Best Regards,
Georgi


WiKi setup guide doesn't say anything about running it under any user other than root...

Thank you.


MySQL runs under myself. Of course you should run emerge as root. Check if myself user can write to /tmp.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
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