Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.00 KB | None | 0 0
  1. Hello there. Newbie here so bear with me. I really need help on this because it's driving me nuts.
  2.  
  3. 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.
  4. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  5. 'sudo mysql_secure_installation
  6.  
  7.  
  8. NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
  9. SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
  10.  
  11. In order to log into MariaDB to secure it, we'll need the current
  12. password for the root user. If you've just installed MariaDB, and
  13. you haven't set the root password yet, the password will be blank,
  14. so you should just press enter here.
  15.  
  16. Enter current password for root (enter for none):
  17. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")
  18. Enter current password for root (enter for none):
  19. Aborting!'
  20.  
  21. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  22.  
  23.  
  24. 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.
  25.  
  26. Then I used the command ‘sudo systemctl status mariadb.service’ but the output is as it shows:
  27.  
  28.  
  29. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  30. mariadb.service - MariaDB 10.1.33 database server
  31. Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pre>
  32. Active: failed (Result: exit-code) since Tue 2018-05-22 08:35:08 WEST; 28s a>
  33. Docs: man:mysqld(8)
  34. https://mariadb.com/kb/en/library/systemd/
  35. Process: 2986 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WS>
  36. Process: 2934 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VA>
  37. Process: 2933 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STAR>
  38. Main PID: 2986 (code=exited, status=1/FAILURE)
  39. Status: "MariaDB server is down"
  40.  
  41. mai 22 08:35:07 ##### systemd[1]: Starting MariaDB 10.1.33 database server>
  42. mai 22 08:35:07 ##### mysqld[2986]: 2018-05-22 8:35:07 140487540780992 [N>
  43. mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [E>
  44. mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [E>
  45. mai 22 08:35:08 ##### systemd[1]: mariadb.service: Main process exited, co>
  46. mai 22 08:35:08 ##### systemd[1]: mariadb.service: Failed with result 'exi>
  47. mai 22 08:35:08 ##### systemd[1]: Failed to start MariaDB 10.1.33 database>
  48. lines 1-18/18 (END)...skipping...
  49. ● mariadb.service - MariaDB 10.1.33 database server
  50. Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  51. Active: failed (Result: exit-code) since Tue 2018-05-22 08:35:08 WEST; 28s ago
  52. Docs: man:mysqld(8)
  53. https://mariadb.com/kb/en/library/systemd/
  54. Process: 2986 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  55. Process: 2934 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WS>
  56. Process: 2933 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  57. Main PID: 2986 (code=exited, status=1/FAILURE)
  58. Status: "MariaDB server is down"
  59.  
  60. mai 22 08:35:07 ##### systemd[1]: Starting MariaDB 10.1.33 database server...
  61. 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 ...
  62. 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")
  63. mai 22 08:35:08 ##### mysqld[2986]: 2018-05-22 8:35:08 140487540780992 [ERROR] Aborting
  64. mai 22 08:35:08 ##### systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
  65. mai 22 08:35:08 ##### systemd[1]: mariadb.service: Failed with result 'exit-code'.
  66. mai 22 08:35:08 ##### systemd[1]: Failed to start MariaDB 10.1.33 database server.
  67.  
  68. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  69.  
  70. 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:
  71.  
  72. -----------------------------------------------------------------------
  73. # mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
  74. ------------------------------------------------------------------------
  75.  
  76. I get this:
  77.  
  78.  
  79. Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
  80. 2018-05-22 14:57:44 140712514944960 [Note] /usr/bin/mysqld (mysqld 10.1.33-MariaDB) starting as process 7685 ...
  81. 2018-05-22 14:57:44 140712514944960 [ERROR] mysqld: File './mysql-bin.index' not found (Errcode: 13 "Permission denied")
  82. 2018-05-22 14:57:44 140712514944960 [ERROR] Aborting
  83.  
  84.  
  85. Installation of system tables failed! Examine the logs in
  86. /var/lib/mysql for more information.
  87.  
  88. The problem could be conflicting information in an external
  89. my.cnf files. You can ignore these by doing:
  90.  
  91. shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
  92.  
  93. You can also try to start the mysqld daemon with:
  94.  
  95. shell> /usr/bin/mysqld --skip-grant-tables --general-log &
  96.  
  97. and use the command line tool /usr/bin/mysql
  98. to connect to the mysql database and look at the grant tables:
  99.  
  100. shell> /usr/bin/mysql -u root mysql
  101. mysql> show tables;
  102.  
  103. Try 'mysqld --help' if you have problems with paths. Using
  104. --general-log gives you a log in /var/lib/mysql that may be helpful.
  105.  
  106. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  107.  
  108. I tried the suggestions listed above and I get this message:
  109.  
  110. 2018-05-22 15:17:51 140669220519872 [Note] /usr/bin/mysqld (mysqld 10.1.33-MariaDB) starting as process 7993 ...
  111. 2018-05-22 15:17:51 140669220519872 [Warning] Can't create test file /var/lib/mysql/#####-pc.lower-test
  112. /usr/bin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied")
  113. 2018-05-22 15:17:51 140669220519872 [ERROR] Aborting
  114.  
  115. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement