0

I have installed MariaDb hundreds of times on previous Ubuntu versions, but on Ubuntu 18.04 I'm struggling. After the installation finishes, once I restart the PC, MariaDB starts for around 2 minutes and then stops.

When I try to login to MySQL, I get the below error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

I was able to login before I restarted the PC with my username root and the root password. Why does everything change after the restart?

error log from /var/log/mysql/error.log

usr/sbin/mysqld: Too many arguments (first extra is 'start').

2018-09-02 17:35:48 139917209496704 [ERROR] Aborting

2018-09-02 17:38:00 140363564260480 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: The InnoDB memory heap is disabled
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Using Linux native AIO
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Using SSE crc32 instructions
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Completed initialization of buffer pool
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Highest supported file format is Barracuda.
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: The log sequence number 1683676 in ibdata file do not match the log sequence number 1683686 in the ib_logfiles!
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: 128 rollback segment(s) are active.
2018-09-02 17:38:00 140363564260480 [Note] InnoDB: Waiting for purge to start
2018-09-02 17:38:00 140363564260480 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.39-83.1 started; log sequence number 1683686
2018-09-02 17:38:00 140362895062784 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-09-02 17:38:00 140363564260480 [Note] Plugin 'FEEDBACK' is disabled.
2018-09-02 17:38:00 140363564260480 [Note] Recovering after a crash using tc.log
2018-09-02 17:38:00 140363564260480 [Note] Starting crash recovery...
2018-09-02 17:38:00 140363564260480 [Note] Crash recovery finished.
2018-09-02 17:38:00 140363564260480 [Note] Server socket created on IP: '127.0.0.1'.
2018-09-02 17:38:00 140363564260480 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.34-MariaDB-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Ubuntu 18.04
2018-09-02 17:39:30 140363563476736 [Note] /usr/sbin/mysqld: Normal shutdown
2018-09-02 17:39:30 140363563476736 [Note] Event Scheduler: Purging the queue. 0 events
2018-09-02 17:39:30 140362953770752 [Note] InnoDB: FTS optimize thread exiting.
2018-09-02 17:39:30 140363563476736 [Note] InnoDB: Starting shutdown...
2018-09-02 17:39:30 140363563476736 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2018-09-02 17:39:32 140363563476736 [Note] InnoDB: Shutdown completed; log sequence number 1683696
2018-09-02 17:39:32 140363563476736 [Note] /usr/sbin/mysqld: Shutdown complete
`
  • there are many reasons - what in You error log file? normally located in /var/log/mysql – a_vlad Sep 2 '18 at 13:50
  • I have added the error log to the question...but it's really weird ...everything work fine after the installation ,once I restart MySQL no longer working. – Osama Al-Banna Sep 2 '18 at 14:54
  • The "ABORTING" at the top of the logs indicated it crashed for some reason which is supported by the crash recovery after it was restarted. More information around that message may help. There is also a 10.1.35 released which might include a bug fix. – danblack Sep 2 '18 at 22:11
  • 1
    1) usr/sbin/mysqld: Too many arguments (first extra is 'start'). .... 2) 2018-09-02 17:38:00 140363564260480 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB. Look at this, what in Your config file? (including all included files if any) – a_vlad Sep 3 '18 at 3:36
  • will I think the main reason is there are files at /var/run/mysqld...this file mysqld.sock is getting deleted once I restart the PC after the installation. – Osama Al-Banna Sep 3 '18 at 6:51
0

mysqld is the server. You don't log into it as a user.

mysql is the client. You do log into it as a user; it then connects to mysqld for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.