First of all, I apologize for asking this here. I know that this is probably not a Slackware question, but I am asking it here because I am running Slackware 64 14.2. I have a notoriously short attention span, which I am sure will interfere at some point or other, in dealing with this issue. I have found out in my researches of the past hour that this problem can often be caused by disk space issues. I have eliminated that:
Code:
root@caitlyn:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 707G 273G 399G 41% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 1.1M 3.9G 1% /run
tmpfs 3.9G 176K 3.9G 1% /dev/shm
cgroup_root 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda5 96G 47G 45G 52% /home
cgmfs 100K 0 100K 0% /run/cgmanager/fs
Plenty of disk space.
Here is the actual error:
Code:
root@caitlyn:~# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2 "No such file or directory")
Code:
root@caitlyn:~# ls -l /var/run/mysql/
total 0
As you can see, files that should be there are not. I suspected that mysql was not running, so I issued
Code:
root@caitlyn:~# ps -ef | grep mysql
root 19465 1789 0 17:05 pts/1 00:00:00 grep mysql
which confirms that it is NOT running. I then chmod +x to /etc/rc.d/rc.mysqld and then
Code:
root@caitlyn:~# /etc/rc.d/rc.mysqld start
root@caitlyn:~# 180122 17:06:14 mysqld_safe Logging to '/var/lib/mysql/caitlyn.err'.
180122 17:06:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
I looked at /var/lib/mysql/caitlyn_error:
Code:
root@caitlyn:~# cat /var/lib/mysql/caitlyn.err
180122 16:55:28 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180122 16:55:28 [Note] /usr/libexec/mysqld (mysqld 10.0.33-MariaDB) starting as process 19387 ...
180122 16:55:30 [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.
180122 16:55:30 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180122 16:55:30 [Note] InnoDB: The InnoDB memory heap is disabled
180122 16:55:30 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180122 16:55:30 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180122 16:55:30 [Note] InnoDB: Compressed tables use zlib 1.2.8
180122 16:55:30 [Note] InnoDB: Using Linux native AIO
180122 16:55:30 [Note] InnoDB: Using CPU crc32 instructions
180122 16:55:30 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180122 16:55:30 [Note] InnoDB: Completed initialization of buffer pool
180122 16:55:30 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
180122 16:55:30 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
180122 16:55:30 [Note] InnoDB: Database physically writes the file full: wait...
180122 16:55:30 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
180122 16:55:30 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
180122 16:55:31 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
180122 16:55:31 [Warning] InnoDB: New log files created, LSN=45781
180122 16:55:31 [Note] InnoDB: Doublewrite buffer not found: creating new
180122 16:55:31 [Note] InnoDB: Doublewrite buffer created
180122 16:55:31 [Note] InnoDB: 128 rollback segment(s) are active.
180122 16:55:31 [Warning] InnoDB: Creating foreign key constraint system tables.
180122 16:55:31 [Note] InnoDB: Foreign key constraint system tables created
180122 16:55:31 [Note] InnoDB: Creating tablespace and datafile system tables.
180122 16:55:31 [Note] InnoDB: Tablespace and datafile system tables created.
180122 16:55:31 [Note] InnoDB: Waiting for purge to start
180122 16:55:31 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 0
180122 16:55:31 [Note] Plugin 'FEEDBACK' is disabled.
180122 16:55:31 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
180122 16:55:31 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
180122 16:55:31 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
180122 16:55:31 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
180122 17:06:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180122 17:06:14 [Note] /usr/libexec/mysqld (mysqld 10.0.33-MariaDB) starting as process 19546 ...
180122 17:06:14 [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.
180122 17:06:14 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180122 17:06:14 [Note] InnoDB: The InnoDB memory heap is disabled
180122 17:06:14 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180122 17:06:14 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180122 17:06:14 [Note] InnoDB: Compressed tables use zlib 1.2.8
180122 17:06:14 [Note] InnoDB: Using Linux native AIO
180122 17:06:14 [Note] InnoDB: Using CPU crc32 instructions
180122 17:06:14 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180122 17:06:15 [Note] InnoDB: Completed initialization of buffer pool
180122 17:06:15 [Note] InnoDB: Highest supported file format is Barracuda.
180122 17:06:15 [Note] InnoDB: Starting crash recovery from checkpoint LSN=49463
180122 17:06:15 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
180122 17:06:15 [Note] InnoDB: Starting final batch to recover 11 pages from redo log
180122 17:06:15 [Note] InnoDB: 128 rollback segment(s) are active.
180122 17:06:15 [Note] InnoDB: Waiting for purge to start
180122 17:06:15 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1600607
180122 17:06:15 [Note] Plugin 'FEEDBACK' is disabled.
180122 17:06:15 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
180122 17:06:15 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
180122 17:06:15 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
180122 17:06:15 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
And I start to get a little overwhelmed. It LOOKS like I should run mysql_upgrade, but when I do, I see:
Code:
root@caitlyn:~# mysql_upgrade
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2 "No such file or directory")
FATAL ERROR: Upgrade failed
I have not used mysql since I installed Slackware last January, which might be causing some of my problems. Running mysql_secure_installation just asks for my root password a bunch of times and tells me that it can't do anything because of Error 2002. What should I do? Thank you in advance for any advice you can offer...