проблемы с MySQL
Гость 11 октября, 2006 - 20:50
поставил с горем по-полам apache2 и php.
и сделал emerge mysql. ну и как в gentoo-wiki сделал emerge --config mysql.
мне это всё надо для девелопмента(то есть чисто для себя).
так вот запускаю /etc/init.d/mysqld start. запускается
запускаю mysql - фиг там типа эррор:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
»
- Для комментирования войдите или зарегистрируйтесь
...
Во-первых, проверь действительно ли mysql запустился..
во-вторых посмотри лог.
Если не разберешься запость сюда.
хехе :] 6Mb места
хехе :]
6Mb места осталось, вот он и орал :)
но всё равно спасибо за поддержку
MySql
Аналогичная проблема, но места хватает, а вот логи не пишутся
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# /etc/init.d/mysql start *
# /etc/init.d/mysql start
* Starting mysql ...
* Starting mysql (/etc/mysql/my.cnf)
* MySQL NOT started (1)
========================================================
# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
========================================================
а вот логи /var/log/mysql/mysqld.err
080917 16:13:54 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
080917 16:13:54 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
080917 16:13:54 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
080917 16:13:54 InnoDB: Started; log sequence number 0 43655
080917 16:13:54 [Note] Recovering after a crash using mysqld-bin
080917 16:13:54 [Note] Starting crash recovery...
080917 16:13:54 [Note] Crash recovery finished.
080917 16:13:54 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
...
куда смотреть, подскажите плиз :)
Это Вы только
Это Вы только установили MySQL?
------
Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
------
там какой-то скрипт запускать нужно, который создаёт вот эти таблицы.. (правда не припоминаю таблицу host, может и не в этом дело)
Какой именно скрипт запускать кажись в конце установки мускула сообщается..
Этот скрипт -
Этот скрипт - emerge mysql --config
emerge mysql
emerge mysql --config
Configuring pkg...
* Creating the mysql database and setting proper
* permissions on it ...
* Insert a password for the mysql 'root' user
* Avoid ["'\_%] characters in the password
>
* Retype the password
>
*
* ERROR: dev-db/mysql-5.0.54 failed.
* Call stack:
* ebuild.sh, line 49: Called pkg_config
* environment, line 3378: Called mysql_pkg_config
* environment, line 3084: Called die
* The specific snippet of code:
* die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log";
* The die message:
* Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND /var/tmp/portage/dev-db/mysql-5.0.54/temp/mysql_install_db.log
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/dev-db/mysql-5.0.54/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.0.54/temp/environment'.
* This ebuild is from an overlay: '/var/db/pkg/'
*
Не понимаю что тут делать надо... Чесно говоря с мусикулом в первые сталкиваюсь :)
tail -100
tail -100 /var/log/mysql/mysqld.err;
ls -alhR /var/lib/mysql/*;
в студию
ls -alhR
ls -alhR /var/lib/mysql/*
/var/lib/mysql/mysql:
итого 8,0K
drwx------ 2 mysql root 4,0K Дек 19 19:26 .
drwx------ 4 mysql root 4,0K Дек 19 19:26 ..
/var/lib/mysql/test:
итого 8,0K
drwx------ 2 mysql root 4,0K Дек 19 19:26 .
drwx------ 4 mysql root 4,0K Дек 19 19:26 ..
tail -100 /var/log/mysql/mysqld.err;
InnoDB: buffer...
081214 17:12:51 InnoDB: Started; log sequence number 0 43655
081214 17:12:51 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
081214 17:22:47 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081214 17:22:47 InnoDB: Started; log sequence number 0 43655
081214 17:22:47 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
081214 17:29:35 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081214 17:29:35 InnoDB: Started; log sequence number 0 43655
081214 17:29:35 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
081218 19:52:38 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081218 19:52:38 InnoDB: Started; log sequence number 0 43655
081218 19:52:38 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
081218 20:15:18 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081218 20:15:18 InnoDB: Started; log sequence number 0 43655
081218 20:15:18 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
081218 20:22:42 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081218 20:22:42 InnoDB: Started; log sequence number 0 43655
081218 20:22:42 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
081219 18:05:23 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081219 18:05:23 InnoDB: Started; log sequence number 0 43655
081219 18:05:23 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
*** stack smashing detected ***: mysqld - terminated
mysqld: stack smashing attack in function int mysql_prepare_table(THD*, HA_CREATE_INFO*, Alter_info*, bool, uint*, handler*, KEY**, uint*, int) - terminated
Report to http://bugs.gentoo.org/
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
081219 19:39:46 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
081219 19:39:47 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
081219 19:39:47 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
081219 19:39:47 InnoDB: Started; log sequence number 0 0
081219 19:39:47 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
*** stack smashing detected ***: mysqld - terminated
mysqld: stack smashing attack in function int mysql_prepare_table(THD*, HA_CREATE_INFO*, Alter_info*, bool, uint*, handler*, KEY**, uint*, int) - terminated
Report to http://bugs.gentoo.org/
*** stack smashing detected ***: mysqld - terminated
mysqld: stack smashing attack in function int mysql_prepare_table(THD*, HA_CREATE_INFO*, Alter_info*, bool, uint*, handler*, KEY**, uint*, int) - terminated
Report to http://bugs.gentoo.org/
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
081219 19:55:26 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
081219 19:55:26 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
081219 19:55:27 InnoDB: Started; log sequence number 0 43655
081219 19:55:27 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
081219 19:55:27 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.70' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-5.0.70-r1
*** stack smashing detected ***: mysqld - terminated
mysqld: stack smashing attack in function int mysql_prepare_table(THD*, HA_CREATE_INFO*, Alter_info*, bool, uint*, handler*, KEY**, uint*, int) - terminated
Report to http://bugs.gentoo.org/