November 2012
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  

Categories

November 2012
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  

MySQL ERROR 1045 Access denied for ‘user’@’localhost’

The Problem

The logfile of mysqld, /var/log/upstart/mysql.log, reported yet another error:

?120618 14:07:31 [Note] /usr/sbin/mysqld: ready for connections.

Version: ‘5.5.24-0ubuntu0.12.04.1’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 (Ubuntu)

mysqld is alive

Checking for tables which need an upgrade, are corrupt or were

not closed cleanly.

120618 14:07:36 [ERROR] Cannot find or open table nova/projects from

the internal […]

Optimizing my.cnf file for MySQL

[mysqld] socket=/path/to/mysql.sock datadir=/var/lib/mysql skip-locking skip-innodb # MySQL 4.x has query caching available. # Enable it for vast improvement and it may be all you need to tweak. query_cache_type=1 query_cache_limit=1M query_cache_size=32M # max_connections=500 # Reduced to 200 as memory will not be enough for 500 connections. # memory=key_buffer+(sort_buffer_size+read_buffer_size)*max_connections # which is now: 64 + (1 + […]