1

привет. установил mysql 5.6. после установки хотел перейти к настройке но:

[root@: ~]# mysql_secure_installation



NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):

я только что установил. то есть не установил пароль. нажимаю ентер не подключается.


потом хотел запустить mysql

[root@: ~]# service mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]

mysql лог:

140807 10:11:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2014-08-07 10:11:27 0 [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.
2014-08-07 10:11:27 0 [Warning] option 'thread_stack': unsigned value 65536 adjusted to 131072
2014-08-07 10:11:27 26885 [Note] Plugin 'FEDERATED' is disabled.
2014-08-07 10:11:27 26885 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-08-07 10:11:27 26885 [Note] InnoDB: The InnoDB memory heap is disabled
2014-08-07 10:11:27 26885 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-08-07 10:11:27 26885 [Note] InnoDB: Memory barrier is not used
2014-08-07 10:11:27 26885 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-08-07 10:11:27 26885 [Note] InnoDB: Using Linux native AIO
2014-08-07 10:11:27 26885 [Note] InnoDB: Not using CPU crc32 instructions
2014-08-07 10:11:27 26885 [Note] InnoDB: Initializing buffer pool, size = 56.0M
2014-08-07 10:11:27 26885 [Note] InnoDB: Completed initialization of buffer pool
2014-08-07 10:11:27 26885 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2014-08-07 10:11:27 26885 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-08-07 10:11:27 26885 [ERROR] Plugin 'InnoDB' init function returned error.
2014-08-07 10:11:27 26885 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-08-07 10:11:27 26885 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-08-07 10:11:27 26885 [ERROR] Aborting

помогите пожалуйста.

2

А что если сделать так:

# rm /var/lib/mysql/mysql.sock
# service mysqld start

3

AlfaStriker пишет:

А что если сделать так:

# rm /var/lib/mysql/mysql.sock
# service mysqld start

переустановил теперь работает. все таки спс.

4

люби в mysql 5.6 как включить лог медленных запросов?


long_query_time = 1
log-slow-queries = /var/log/mysql/log-slow-queries.log

не запускается mysql

2014-08-08 06:55:48 2375 [ERROR] /usr/sbin/mysqld: unknown variable 'log-slow-queries=/var/log/mysql/log-slow-queries.log'

5

нашел:

long_query_time=1
slow_query_log=1
slow_query_log_file=/var/log/mysql/log-slow-queries.log