Until yesterday I was able to work on my Ubuntu computer, connecting to Mysql with a root user. Today every application I have is not able to connect to mysql. I didn't change its configuration or psw of my root user.
I made lots of tries. Here they are:
mysql -uroot -pmysql -uroot -p --host=127.0.0.1
They all give me this:
Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Then, I tried to launch the following commands (they are not in the exact order I gave them... as you will see, I stumbled upon some errors of 'Unable to lock ./ibdata1' and even 'The partition with /var/lib/mysql is too full!' ... killing pending processes and restarting solved these problems, but still I can't connect to mysql with root):
$ ps -aux | grep mysqlmysql 3249 0.0 1.2 550092 48580 ? Ssl 14:21 0:00 /usr/sbin/mysqldmattia 3616 0.0 0.0 15968 940 pts/11 S+ 14:33 0:00 grep --color=auto mysql$ mysql --no-defaults --force --user=root --host=127.0.0.1 --database=mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)$ mysqld --skip-grant-tables150331 14:32:31 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.150331 14:32:31 [Warning] Can't create test file /var/lib/mysql/Mattia-PC-Linux.lower-test150331 14:32:31 [Warning] Can't create test file /var/lib/mysql/Mattia-PC-Linux.lower-testmysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)150331 14:32:31 [ERROR] Aborting150331 14:32:31 [Note] mysqld: Shutdown completesudo /etc/init.d/mysql stopsudo service mysql stopsudo service mysql startsudo /etc/init.d/mysql start$ tail -n1000 /var/log/mysql/error.logInnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.InnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.150331 14:19:11 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.150331 14:19:11 [Note] Plugin 'FEDERATED' is disabled.150331 14:19:11 InnoDB: The InnoDB memory heap is disabled150331 14:19:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins150331 14:19:11 InnoDB: Compressed tables use zlib 1.2.8150331 14:19:11 InnoDB: Using Linux native AIO150331 14:19:11 InnoDB: Initializing buffer pool, size = 128.0M150331 14:19:11 InnoDB: Completed initialization of buffer pool150331 14:19:11 InnoDB: highest supported file format is Barracuda.150331 14:19:18 InnoDB: Waiting for the background threads to start150331 14:19:19 InnoDB: 5.5.41 started; log sequence number 1515015658150331 14:19:19 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306150331 14:19:19 [Note] - '127.0.0.1' resolves to '127.0.0.1';150331 14:19:19 [Note] Server socket created on IP: '127.0.0.1'.150331 14:19:20 [Note] Event Scheduler: Loaded 0 events150331 14:19:20 [Note] /usr/sbin/mysqld: ready for connections.Version: '5.5.41-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)150331 14:21:44 [Note] /usr/sbin/mysqld: Normal shutdown150331 14:21:44 [Note] Event Scheduler: Purging the queue. 0 events150331 14:21:44 InnoDB: Starting shutdown...150331 14:21:45 InnoDB: Shutdown completed; log sequence number 1515015658150331 14:21:45 [Note] /usr/sbin/mysqld: Shutdown complete150331 14:21:48 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.150331 14:21:48 [Note] Plugin 'FEDERATED' is disabled.150331 14:21:48 InnoDB: The InnoDB memory heap is disabled150331 14:21:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins150331 14:21:48 InnoDB: Compressed tables use zlib 1.2.8150331 14:21:48 InnoDB: Using Linux native AIO150331 14:21:48 InnoDB: Initializing buffer pool, size = 128.0M150331 14:21:48 InnoDB: Completed initialization of buffer pool150331 14:21:48 InnoDB: highest supported file format is Barracuda.150331 14:21:48 InnoDB: Waiting for the background threads to start150331 14:21:49 InnoDB: 5.5.41 started; log sequence number 1515015658150331 14:21:49 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306150331 14:21:49 [Note] - '127.0.0.1' resolves to '127.0.0.1';150331 14:21:49 [Note] Server socket created on IP: '127.0.0.1'.150331 14:21:49 [Note] Event Scheduler: Loaded 0 events150331 14:21:49 [Note] /usr/sbin/mysqld: ready for connections.Version: '5.5.41-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
This is /etc/mysql/my.cnf:
## The MySQL database server configuration file.## You can copy this to one of:# - "/etc/mysql/my.cnf" to set global options,# - "~/.my.cnf" to set user-specific options.# # One can use all long options that the program supports.# Run program with --help to get a list of available options and with# --print-defaults to see which it would actually understand and use.## For explanations see# http://dev.mysql.com/doc/mysql/en/server-system-variables.html# This will be passed to all mysql clients# It has been reported that passwords should be enclosed with ticks/quotes# escpecially if they contain "#" chars...# Remember to edit /etc/mysql/debian.cnf when changing the socket location.[client]port = 3306socket = /var/run/mysqld/mysqld.sock# Here is entries for some specific programs# The following values assume you have at least 32M ram# This was formally known as [safe_mysqld]. Both versions are currently parsed.[mysqld_safe]socket = /var/run/mysqld/mysqld.socknice = 0[mysqld]## * Basic Settings#user = mysqlpid-file = /var/run/mysqld/mysqld.pidsocket = /var/run/mysqld/mysqld.sockport = 3306basedir = /usrdatadir = /var/lib/mysqltmpdir = /tmplc-messages-dir = /usr/share/mysqlskip-external-locking## Instead of skip-networking the default is now to listen only on# localhost which is more compatible and is not less secure.bind-address = 127.0.0.1## * Fine Tuning#key_buffer = 16Mmax_allowed_packet = 16Mthread_stack = 192Kthread_cache_size = 8# This replaces the startup script and checks MyISAM tables if needed# the first time they are touchedmyisam-recover = BACKUP#max_connections = 100#table_cache = 64#thread_concurrency = 10## * Query Cache Configuration#query_cache_limit = 1Mquery_cache_size = 16M## * Logging and Replication## Both location gets rotated by the cronjob.# Be aware that this log type is a performance killer.# As of 5.1 you can enable the log at runtime!#general_log_file = /var/log/mysql/mysql.log#general_log = 1## Error log - should be very few entries.#log_error = /var/log/mysql/error.log## Here you can see queries with especially long duration#log_slow_queries = /var/log/mysql/mysql-slow.log#long_query_time = 2#log-queries-not-using-indexes## The following can be used as easy to replay backup logs or for replication.# note: if you are setting up a replication slave, see README.Debian about# other settings you may need to change.#server-id = 1#log_bin = /var/log/mysql/mysql-bin.logexpire_logs_days = 10max_binlog_size = 100M#binlog_do_db = include_database_name#binlog_ignore_db = include_database_name## * InnoDB## InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.# Read the manual for more InnoDB related options. There are many!## * Security Features## Read the manual, too, if you want chroot!# chroot = /var/lib/mysql/## For generating SSL certificates I recommend the OpenSSL GUI "tinyca".## ssl-ca=/etc/mysql/cacert.pem# ssl-cert=/etc/mysql/server-cert.pem# ssl-key=/etc/mysql/server-key.pem[mysqldump]quickquote-namesmax_allowed_packet = 16M[mysql]#no-auto-rehash # faster start of mysql but no tab completition[isamchk]key_buffer = 16M## * IMPORTANT: Additional settings that can override those from this file!# The files must end with '.cnf', otherwise they'll be ignored.#!includedir /etc/mysql/conf.d/
Any idea?