Thursday, November 6, 2014

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

mysql listener not started yet


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)



[root@baja ~]# service mysqld start
Initializing MySQL database:  2014-11-05 15:37:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-11-05 15:37:33 17834 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-11-05 15:37:33 17834 [Note] InnoDB: The InnoDB memory heap is disabled
2014-11-05 15:37:33 17834 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-11-05 15:37:33 17834 [Note] InnoDB: Memory barrier is not used
2014-11-05 15:37:33 17834 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-11-05 15:37:33 17834 [Note] InnoDB: Using Linux native AIO
2014-11-05 15:37:33 17834 [Note] InnoDB: Using CPU crc32 instructions
2014-11-05 15:37:33 17834 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-11-05 15:37:33 17834 [Note] InnoDB: Completed initialization of buffer pool
2014-11-05 15:37:33 17834 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2014-11-05 15:37:33 17834 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2014-11-05 15:37:33 17834 [Note] InnoDB: Database physically writes the file full: wait...
2014-11-05 15:37:33 17834 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2014-11-05 15:37:35 17834 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2014-11-05 15:37:36 17834 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2014-11-05 15:37:36 17834 [Warning] InnoDB: New log files created, LSN=45781
2014-11-05 15:37:36 17834 [Note] InnoDB: Doublewrite buffer not found: creating new
2014-11-05 15:37:36 17834 [Note] InnoDB: Doublewrite buffer created
2014-11-05 15:37:36 17834 [Note] InnoDB: 128 rollback segment(s) are active.
2014-11-05 15:37:36 17834 [Warning] InnoDB: Creating foreign key constraint system tables.
2014-11-05 15:37:36 17834 [Note] InnoDB: Foreign key constraint system tables created
2014-11-05 15:37:36 17834 [Note] InnoDB: Creating tablespace and datafile system tables.
2014-11-05 15:37:36 17834 [Note] InnoDB: Tablespace and datafile system tables created.
2014-11-05 15:37:36 17834 [Note] InnoDB: Waiting for purge to start
2014-11-05 15:37:36 17834 [Note] InnoDB: 5.6.21 started; log sequence number 0
2014-11-05 15:37:37 17834 [Note] Binlog end
2014-11-05 15:37:37 17834 [Note] InnoDB: FTS optimize thread exiting.
2014-11-05 15:37:37 17834 [Note] InnoDB: Starting shutdown...
2014-11-05 15:37:39 17834 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2014-11-05 15:37:39 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-11-05 15:37:39 17857 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-11-05 15:37:39 17857 [Note] InnoDB: The InnoDB memory heap is disabled
2014-11-05 15:37:39 17857 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-11-05 15:37:39 17857 [Note] InnoDB: Memory barrier is not used
2014-11-05 15:37:39 17857 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-11-05 15:37:39 17857 [Note] InnoDB: Using Linux native AIO
2014-11-05 15:37:39 17857 [Note] InnoDB: Using CPU crc32 instructions
2014-11-05 15:37:39 17857 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-11-05 15:37:39 17857 [Note] InnoDB: Completed initialization of buffer pool
2014-11-05 15:37:39 17857 [Note] InnoDB: Highest supported file format is Barracuda.
2014-11-05 15:37:39 17857 [Note] InnoDB: 128 rollback segment(s) are active.
2014-11-05 15:37:39 17857 [Note] InnoDB: Waiting for purge to start
2014-11-05 15:37:39 17857 [Note] InnoDB: 5.6.21 started; log sequence number 1625977
2014-11-05 15:37:39 17857 [Note] Binlog end
2014-11-05 15:37:39 17857 [Note] InnoDB: FTS optimize thread exiting.
2014-11-05 15:37:39 17857 [Note] InnoDB: Starting shutdown...
2014-11-05 15:37:41 17857 [Note] InnoDB: Shutdown completed; log sequence number 1625987




PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /usr/bin/mysqladmin -u root password 'new-password'
  /usr/bin/mysqladmin -u root -h baja password 'new-password'

Alternatively you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

Note: new default config file not created.
Please make sure your config file is current

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@baja ~]#

That resolved the issue. If it does not try this.
sudo chmod -R 777 /var/lib/mysql/

No comments:

Post a Comment