Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / MySQL [игнор отключен] [закрыт для гостей] / Не создаётся хр. процедура / 18 сообщений из 18, страница 1 из 1
01.12.2014, 15:22:44
    #38821449
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
Добрый день, форумчане проблема следующего характера.

Пытался добавить в mysql хранимую процедурку нечего не получилось. Таблицы и вьюхи нет проблем , а вот процедуры никак.

Даже

/*Ответ MySQL: #1558 - Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50095, now running 50538. Please use mysql_upgrade to fix this erro*/

Сделал
[root@mail ~]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

Начал капать далее. В логе при перерестарте выпадают следующие ошибки:

141201 14:10:23 [Note] /usr/libexec/mysqld: Normal shutdown

141201 14:10:24 InnoDB: Starting shutdown...
141201 14:10:25 InnoDB: Shutdown completed; log sequence number 121047238
141201 14:10:25 [Note] /usr/libexec/mysqld: Shutdown complete

141201 14:10:26 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141201 14:10:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141201 14:10:27 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
141201 14:10:27 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
141201 14:10:27 InnoDB: The InnoDB memory heap is disabled
141201 14:10:27 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
141201 14:10:27 InnoDB: Compressed tables use zlib 1.2.3
141201 14:10:27 InnoDB: Using Linux native AIO
141201 14:10:27 InnoDB: Initializing buffer pool, size = 128.0M
141201 14:10:27 InnoDB: Completed initialization of buffer pool
141201 14:10:27 InnoDB: highest supported file format is Barracuda.
141201 14:10:30 InnoDB: Waiting for the background threads to start
141201 14:10:31 InnoDB: 5.5.38 started; log sequence number 121047238
141201 14:10:31 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141201 14:10:31 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141201 14:10:31 [Note] Server socket created on IP: '0.0.0.0'.
141201 14:10:31 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
141201 14:10:31 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
141201 14:10:31 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50095, now running 50538. Please use mysql_upgrade to fix this error.
141201 14:10:31 [ERROR] mysql.user has no `Event_priv` column at position 29
141201 14:10:31 [ERROR] Cannot open mysql.event
141201 14:10:31 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
141201 14:10:31 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.38' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi





Подскажите что делать и куда копать. И что это может быть. В MySQl не силён. Всегда работал с MSSQL
...
Рейтинг: 0 / 0
01.12.2014, 15:38:13
    #38821474
alex564657498765453
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaДобрый день, форумчане проблема следующего характера.

Пытался добавить в mysql хранимую процедурку нечего не получилось. Таблицы и вьюхи нет проблем , а вот процедуры никак.

Даже

/*Ответ MySQL: #1558 - Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50095, now running 50538. Please use mysql_upgrade to fix this erro*/

Сделал
[root@mail ~]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

Начал капать далее. В логе при перерестарте выпадают следующие ошибки:

141201 14:10:23 [Note] /usr/libexec/mysqld: Normal shutdown

141201 14:10:24 InnoDB: Starting shutdown...
141201 14:10:25 InnoDB: Shutdown completed; log sequence number 121047238
141201 14:10:25 [Note] /usr/libexec/mysqld: Shutdown complete

141201 14:10:26 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141201 14:10:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141201 14:10:27 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
141201 14:10:27 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
141201 14:10:27 InnoDB: The InnoDB memory heap is disabled
141201 14:10:27 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
141201 14:10:27 InnoDB: Compressed tables use zlib 1.2.3
141201 14:10:27 InnoDB: Using Linux native AIO
141201 14:10:27 InnoDB: Initializing buffer pool, size = 128.0M
141201 14:10:27 InnoDB: Completed initialization of buffer pool
141201 14:10:27 InnoDB: highest supported file format is Barracuda.
141201 14:10:30 InnoDB: Waiting for the background threads to start
141201 14:10:31 InnoDB: 5.5.38 started; log sequence number 121047238
141201 14:10:31 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141201 14:10:31 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141201 14:10:31 [Note] Server socket created on IP: '0.0.0.0'.
141201 14:10:31 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
141201 14:10:31 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
141201 14:10:31 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50095, now running 50538. Please use mysql_upgrade to fix this error.
141201 14:10:31 [ERROR] mysql.user has no `Event_priv` column at position 29
141201 14:10:31 [ERROR] Cannot open mysql.event
141201 14:10:31 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
141201 14:10:31 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.38' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi





Подскажите что делать и куда копать. И что это может быть. В MySQl не силён. Всегда работал с MSSQL

плин... вот всегда хочеться ответить.

если mssql овтетит - что поле count в sys.sys_table плохое.

куда бы копал?
...
Рейтинг: 0 / 0
01.12.2014, 15:41:15
    #38821480
alex564657498765453
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
дабы избежать холивара - подскажу.
перевёл бы сначала сообщение про ошибку, потом бы в бил в гугл номер ошибки, и сразу бы нашол. база системная не от той версии мускла которая запущена.
...
Рейтинг: 0 / 0
01.12.2014, 15:49:43
    #38821493
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
alex564657498765453дабы избежать холивара - подскажу.
перевёл бы сначала сообщение про ошибку, потом бы в бил в гугл номер ошибки, и сразу бы нашол. база системная не от той версии мускла которая запущена.

Спасибо. И как быть. Да я обновлял mysql. Сейчас 5.5.38 на centos5.5

Прошу прощениея за глупые вопросы .

И как далее быть ? Как приатачить нужную? Ведь там же хранятся все данные по другим БД.
И почему я могу создавать БД таблици и т.д. Ведь по идеи оно не должно и этого давать сделать :(
...
Рейтинг: 0 / 0
01.12.2014, 18:17:40
    #38821767
alex564657498765453
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stinggga,

насколько знаю я, если база с таблицами майисам, то подключить её на скл сервер - просто скопировать папку базы в нужное место

если иннодб, вот тут дела обстоят сложнее.

у меня получилось но по форуму помню что с этим были проблемы.
...
Рейтинг: 0 / 0
01.12.2014, 19:19:53
    #38821819
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
alex564657498765453stinggga,

насколько знаю я, если база с таблицами майисам, то подключить её на скл сервер - просто скопировать папку базы в нужное место

если иннодб, вот тут дела обстоят сложнее.

у меня получилось но по форуму помню что с этим были проблемы.

БД information_schema или mysql ?
...
Рейтинг: 0 / 0
01.12.2014, 19:24:18
    #38821828
miksoft
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaИ как далее быть ?Я бы предложил выгрузить дамп (без системных схем), переустановить начисто нужную версию MySQL и загрузить дамп обратно.
...
Рейтинг: 0 / 0
01.12.2014, 23:46:04
    #38822054
alex564657498765453
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaalex564657498765453stinggga,

насколько знаю я, если база с таблицами майисам, то подключить её на скл сервер - просто скопировать папку базы в нужное место

если иннодб, вот тут дела обстоят сложнее.

у меня получилось но по форуму помню что с этим были проблемы.

БД information_schema или mysql ?

ни то ни другое. свою базу. системные не трогать!!!
...
Рейтинг: 0 / 0
02.12.2014, 10:33:28
    #38822248
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
alex564657498765453stingggaпропущено...


БД information_schema или mysql ?

ни то ни другое. свою базу. системные не трогать!!!

А так у меня просто отсутствует бд performance_schema ?!
...
Рейтинг: 0 / 0
02.12.2014, 10:42:12
    #38822255
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaalex564657498765453пропущено...


ни то ни другое. свою базу. системные не трогать!!!

А так у меня просто отсутствует бд performance_schema ?!

И вставить то процедуру не могу не в какую БД.
...
Рейтинг: 0 / 0
02.12.2014, 11:05:46
    #38822286
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggastingggaпропущено...


А так у меня просто отсутствует бд performance_schema ?!

И вставить то процедуру не могу не в какую БД.

Хотел бы подрезуюмировать. С ваших слов мне нужно в мои несистемные БД ( в их папки) добавить недостоющие таблицы или перезаписать ? Прошу прощения, я пока не понял. Заранее извеняюсь за ,возможно , глупые вопросы. Это мой первый опыт в настройке и работе с мускл

Но лог пишит что плохая структура

141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
141201 14:10:31 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
...
Рейтинг: 0 / 0
02.12.2014, 12:34:44
    #38822430
MasterZiv
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaИ как далее быть ? Как приатачить нужную? Ведь там же хранятся все данные по другим БД.
И почему я могу создавать БД таблици и т.д. Ведь по идеи оно не должно и этого давать сделать :(

Поставь MySQL заново и делов.
...
Рейтинг: 0 / 0
02.12.2014, 12:38:21
    #38822442
miksoft
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
MasterZivstingggaИ как далее быть ? Как приатачить нужную? Ведь там же хранятся все данные по другим БД.
И почему я могу создавать БД таблици и т.д. Ведь по идеи оно не должно и этого давать сделать :(

Поставь MySQL заново и делов.Я это уже предлагал, но, видимо, так неинтересно :)
...
Рейтинг: 0 / 0
02.12.2014, 13:54:44
    #38822569
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
miksoftMasterZivпропущено...


Поставь MySQL заново и делов.Я это уже предлагал, но, видимо, так неинтересно :)

Есть один ньюанс почему я не хочу пока переставлять. Путаюсь найти другие варианты :) Так понимаю что нет ?!
...
Рейтинг: 0 / 0
02.12.2014, 14:12:18
    #38822590
miksoft
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaПутаюсь найти другие варианты :) Так понимаю что нет ?!Да может и есть.
Нужно детально разбираться, почему mysql_upgrade выдает ошибку. В т.ч. посмотреть внутрь его (это скрипт) и аккуратно соотносить его запуск с логами. Возможно, ему не хватает какой-нибудь банальщины типа запуска с указанием root-а.
Но в сумме, имхо, это дольше, чем переустановить.
...
Рейтинг: 0 / 0
02.12.2014, 16:48:40
    #38822789
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
miksoftstingggaПутаюсь найти другие варианты :) Так понимаю что нет ?!Да может и есть.
Нужно детально разбираться, почему mysql_upgrade выдает ошибку. В т.ч. посмотреть внутрь его (это скрипт) и аккуратно соотносить его запуск с логами. Возможно, ему не хватает какой-нибудь банальщины типа запуска с указанием root-а.
Но в сумме, имхо, это дольше, чем переустановить.

Просто в /usr/sbin/mysqld ничего не пишет при mysql_upgrade. Только при рестарте ошибки. Только в консоле пишет что fatal_error. И понять сложно.
...
Рейтинг: 0 / 0
02.12.2014, 16:53:11
    #38822795
stinggga
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stinggga,

Спасибо всем за помощь. Заработал mysql_upgrade. Тема закрыта
...
Рейтинг: 0 / 0
02.12.2014, 17:09:46
    #38822819
miksoft
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не создаётся хр. процедура
stingggaЗаработал mysql_upgradeЧудесным образом?
...
Рейтинг: 0 / 0
Форумы / MySQL [игнор отключен] [закрыт для гостей] / Не создаётся хр. процедура / 18 сообщений из 18, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]