Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello there. Newbie here so bear with me. I really need help on this because it's driving me nuts.
- I installed mariadb on Linux Manjaro but I simply can’t start it. In fact, it’s not even running despite all my attempts(enabling, systemctl start, etc). It tells me that the service is inactive(dead) no matter what.
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- 'sudo mysql_secure_installation
- NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
- SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
- In order to log into MariaDB to secure it, we'll need the current
- password for the root user. If you've just installed MariaDB, and
- you haven't set the root password yet, the password will be blank,
- so you should just press enter here.
- Enter current password for root (enter for none):
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")
- Enter current password for root (enter for none):
- Aborting!'
- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- I also can’t find the mysqld.sock at all with ‘find / -type s’ and I’ve tried making changes in the /etc/mysqld/my.cnf file and set the socket(if he even exists) to other directories(like /tmp/) but nothing works. I’ve re-installed mariadb and the result was the same. Also, I don’t have(or can’t find) any error logs to see more in detail what this is all about.
- Then I used the command ‘sudo systemctl status mariadb.service’ but the output is as it shows:
- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- mariadb.service - MariaDB 10.1.33 database server
- Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pre>
- Active: failed (Result: exit-code) since Tue 2018-05-22 08:35:08 WEST; 28s a>
- Docs: man:mysqld(8)
- https://mariadb.com/kb/en/library/systemd/
- Process: 2986 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WS>
- Process: 2934 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VA>
- Process: 2933 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STAR>
- Main PID: 2986 (code=exited, status=1/FAILURE)
- Status: "MariaDB server is down"
- mai 22 08:35:07 ##### systemd[1]: Starting MariaDB 10.1.33 database server>
- mai 22 08:35:07 ##### mysqld[2986]: 2018-05-22 8:35:07 140487540780992 [N>
- mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [E>
- mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [E>
- mai 22 08:35:08 ##### systemd[1]: mariadb.service: Main process exited, co>
- mai 22 08:35:08 ##### systemd[1]: mariadb.service: Failed with result 'exi>
- mai 22 08:35:08 ##### systemd[1]: Failed to start MariaDB 10.1.33 database>
- lines 1-18/18 (END)...skipping...
- ● mariadb.service - MariaDB 10.1.33 database server
- Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
- Active: failed (Result: exit-code) since Tue 2018-05-22 08:35:08 WEST; 28s ago
- Docs: man:mysqld(8)
- https://mariadb.com/kb/en/library/systemd/
- Process: 2986 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
- Process: 2934 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WS>
- Process: 2933 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
- Main PID: 2986 (code=exited, status=1/FAILURE)
- Status: "MariaDB server is down"
- mai 22 08:35:07 ##### systemd[1]: Starting MariaDB 10.1.33 database server...
- mai 22 08:35:07 ##### mysqld[2986]: 2018-05-22 8:35:07 140487540780992 [Note] /usr/bin/mysqld (mysqld 10.1.33-MariaDB) starting as process 2986 ...
- mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [ERROR] mysqld: File './mysql-bin.index' not found (Errcode: 13 "Permission denied")
- mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [ERROR] Aborting
- mai 22 08:35:08 ##### systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
- mai 22 08:35:08 ##### systemd[1]: mariadb.service: Failed with result 'exit-code'.
- mai 22 08:35:08 ##### systemd[1]: Failed to start MariaDB 10.1.33 database server.
- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- I also checked the arch linux documentation about the mariadb and did the steps they mention there. However, after I write this in the shell:
- -----------------------------------------------------------------------
- # mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
- ------------------------------------------------------------------------
- I get this:
- Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
- 2018-05-22 14:57:44 140712514944960 [Note] /usr/bin/mysqld (mysqld 10.1.33-MariaDB) starting as process 7685 ...
- 2018-05-22 14:57:44 140712514944960 [ERROR] mysqld: File './mysql-bin.index' not found (Errcode: 13 "Permission denied")
- 2018-05-22 14:57:44 140712514944960 [ERROR] Aborting
- Installation of system tables failed! Examine the logs in
- /var/lib/mysql for more information.
- The problem could be conflicting information in an external
- my.cnf files. You can ignore these by doing:
- shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
- You can also try to start the mysqld daemon with:
- shell> /usr/bin/mysqld --skip-grant-tables --general-log &
- and use the command line tool /usr/bin/mysql
- to connect to the mysql database and look at the grant tables:
- shell> /usr/bin/mysql -u root mysql
- mysql> show tables;
- Try 'mysqld --help' if you have problems with paths. Using
- --general-log gives you a log in /var/lib/mysql that may be helpful.
- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- I tried the suggestions listed above and I get this message:
- 2018-05-22 15:17:51 140669220519872 [Note] /usr/bin/mysqld (mysqld 10.1.33-MariaDB) starting as process 7993 ...
- 2018-05-22 15:17:51 140669220519872 [Warning] Can't create test file /var/lib/mysql/#####-pc.lower-test
- /usr/bin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied")
- 2018-05-22 15:17:51 140669220519872 [ERROR] Aborting
- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement