I am trying to migrate a test website on drupal onto a live server on Amazon ec2. I migrated the database using phpmyadmin, and tried to access the site. I got this error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB': SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /var/www/includes/lock.inc).
I believe the problem here is that MySQL doesn't have InnoDB. I have looked through the my.cnf file and there is no line that says skip-innodb.
I have tried show engines and it showed a bunch of engines but not innodb.
I have tried restarting my server and deleting the logfile, just like has been suggested previously, but that didn't work.
Maybe what needs to be done is to somehow install the Innodb engine. Could you tell me how I may do that?
On Debian 6 this can also happen when you change the innodb_log_file_size parameter... some times mysql does not start.. but other times it just starts up bud disables innodb engine... so solution is to remove ib_logfiles from /var/lib/mysql and restart mysql
Look in your mysql error log. Run
select ##log_error;
To see where exactly that is.
There is probably something in there telling why it failed on startup. (Perhaps trying to allocate more buffer pool than you have memory?)
Related
I have a D8 google mysql instance. I'm running an etl process trying to push about 100GB of data in but the script keep stopping because of the error.
In order to get it working I have to restart the mysql instance and then re run the process from where it failed. Any help is greatly appreciated. I haven't found anything on google.
This error tends to mean the connection to the MySQL server was lost at some point. As mentioned in this 'Lost connection to MySQL server' article, this error may be encountered when writing a significant number or rows.
The article suggests setting the net_read_timeout to something greater than the default value of 30 seconds. You may also want to consider breaking up your write tasks as well.
I know that many people get the same kind of error when they try to install Drupal 7. But after trying out the solutions that I read about, I still didn't manage to install Drupal properly.
After installing 27 modules (of 28) I get the following message:
An AJAX HTTP error occurred.
HTTP Result Code: 500 Debugging information follows.
Path: `http://localhost/drupal/install.php?profile=standard&locale=en&id=1&op=do`
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[HY000]:
General error: 2006 MySQL server has gone away:
SELECT expire, value FROM {semaphore}
WHERE name = :name; Array ( [:name] => menu_rebuild )
in lock_may_be_available()
(line 167 of C:\wamp\www\drupal\includes\lock.inc).Uncaught exception thrown in shutdown function.PDOException:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away:
DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ;
Array ( [:db_condition_placeholder_0] => 802228002541876118e8773.14607894 )
in lock_release_all()
(line 269 of C:\wamp\www\drupal\includes\lock.inc).
Uncaught exception thrown in session handler.PDOException: SQLSTATE[HY000]:
General error: 2006 MySQL server has gone away:
SELECT 1 AS expression FROM {sessions} sessions
WHERE ( (sid = :db_condition_placeholder_0) AND
(ssid = :db_condition_placeholder_1) );
Array ( [:db_condition_placeholder_0] => ZLNqcOjZv5_OY8Y_fNwE0Il6hHmlJCLVL9qK5XUBTIo
[:db_condition_placeholder_1] => ) in _drupal_session_write()
(line 209 of C:\wamp\www\drupal\includes\session.inc).'
When I restart WAMP server after it stopped, I can install Drupal anyway, but then it is not working properly.
I have raised the number of the max_allowed_packet to various high amounts.
I have raised other numbers in my my.ini.
I have installed WAMP anew.
Each time I try anew, I delete Drupal, my databank and my history in Chrome.
My PHP version is 5.5.12
I work in Windows 8
I work on my localhost.
What else can I try?
I tried to increase the numbers in my.ini and php.ini, but that didn't help. I drop my database after each error.
I have a new idea myself:
Could it have something to do with my settings.php?
Before I start I set: $update_free_access = FALSE; to TRUE (as administrator in Notepad++). After I close the file I reopen it to check whether it has really changed. After I get the error I reopen the settings.php file and it says $update_free_access = FALSE again. But I did not change it back myself.
Could this be the source of my problem? How can I avoid this?
And should I do something with this in the same file?
'pdo' => array( * PDO::ATTR_TIMEOUT => 5,
Is there something else I should change in the settings.php?
Perhaps not enough MySQL memory! Increasing MySQL memory might solve this issue (my.conf).
See here: https://www.drupal.org/node/1014172
Try to change it in your php.ini:
max_allowed_packet=100M
I think it fixes your problem. Don't forget to restart wamp.
Regards.
I think first time you tried installing Drupal, it must have met some unexpected termination. The above error also comes when all the tables and variables at install time are not configured properly.
I suggest to drop your database and attempt a fresh install again. Also, do ensure your installation is not timing out.
RE: I have raised other numbers in my my.ini.
If you are using the WAMPServer 64bit install, please check that the my.ini file contains this section header [wampmysqld64]
i.e.
Replace [wampmysqld] with [wampmysqld64]
This section name should match the service name that MySQL is run under which in the 64bit install of WAMPServer is wampmysqld64. Unfortunately the 2.5 (64bit) release has this error in it.
Please check if your environment matches System requirements for Drupal.
Drupal 7:
MySQL 5.0.15/MariaDB 5.1.44/Percona Server 5.1.70 or higher with PDO,
PostgreSQL 8.3 or higher with PDO,
SQLite 3.3.7 or higher
and database requirements which says:
It may be necessary to set the system variable max_allowed_packet to at least 16M. Some inexpensive hosting plans set this value too low (the MySQL default is only 1M). In that case, you may need to choose a better hosting plan.
So basically you need to edit your my.cnf (e.g. ~/.my.cnf) and set or increase the value of max_allowed_packet your under [mysqld] section, e.g.
[mysqld]
max_allowed_packet=64M
If it's still failing, don't hesitate to increase it further more like 256M in case when Drupal is in need of parsing huge amount of data.
See: B.5.2.9 MySQL server has gone away for more detailed information.
Today my datacenter had a breaker fail which resulted in my servers losing power. I'm running a 4 node MySQL cluster. I restarted the cluster, first the management nodes, then the data nodes, then after the data nodes were running I started the SQL nodes. I then checked the cluster with ndb_mgm -e SHOW. Everything seemed fine until I tried running a query. I got this error,
ERROR 1296 (HY000): Got error 157 'Unknown error code' from NDBCLUSTER
I check the MySQL logs and could not find any errors. I then tried a full shutdown and restart of the MySQL cluster and checked config between the shutdown and start. Everything seemed to check out. I then ran a query on another database using the NDBCLUSTER engine. The query was successful. I've tried searching google but no one seems to have any answers that help. I've checked the config, I've made sure ndbd is running on the data nodes, ect. The other databases seem to be working fine except this one. I have a backup of the database but I would much preferably recover the database if possible.
If anyone has any suggestion or ideas, it would be greatly appreciated.
Thanks in advance.
Error 157 is actually 'could not connect to storage engine' and the fact that MySQL fails to report that error correctly is a bug: http://bugs.mysql.com/bug.php?id=44817
The case described in that bug mentions that you get the error when you try to query a table in NDB when the cluster is still down.
So I'm just guessing, but I would conclude that your cluster is not started. Either you missed starting one of the nodes, or else something went wrong starting one of the nodes.
Check the mysql server is really connected to the NDB storage.
Do from a mysql server that should be connected to NDB
SHOW GLOBAL STATUS LIKE 'Ndb_cluster_node_id';
Is the answer > 0?
SHOW GLOBAL STATUS LIKE 'Ndb_number_of_data_nodes';
Is the answer > 0 ?
If not, then the mysql server is not connected and then i would recommend you check your firewall and /etc/hosts table and make sure you dont have a line like:
127.0.0.1 localhost ..
Best regards
Johan
Some of you may say "there's a lot of answers in other threads" or "Google it". But actually I didn't find the answer.
I am developing a PHP / MySQL project using symfony and for an unknown reason (meaning "I wasn't writing any php line"), I got this error "SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB'".
I already tried these solutions:
Restart MySQL
Stop MySQL, delete ib_logfile0 and ib_logfile1, Start Mysql
Do a "Show engines". This command returns no instance of "InnoDB". Not even a "NOT ACTIVE" (weird, right ?).
(even weirder) PHPMyAdmin displays all tables except that the ones using InnoDB display "used" instead of "InnoDB". No problem with MyISAM tables.
Some people suggested to dump database, recompile MySQL and load the sql file into the recompiled database but... Let say I'm not in the mood for that (that would take a LOT of time).
Show engines tells that InnoDB failed to start on whatever reason.
You have to open the error log (check SHOW VARIABLES LIKE 'error_log'):
mysql> show variables like 'log_error';
+---------------+--------------------------+
| Variable_name | Value |
+---------------+--------------------------+
| log_error | /var/log/mysql/error.log |
+---------------+--------------------------+
1 row in set (0.00 sec)
and find a reason why InnoDB failed to start. Then fix it.
First check your MySQL version, if have support to innoDB, second check the mysql config file (/etc/my.cnf or /etc/mysql/my.cnf) on linux, (Windows i don't know) if innodb is disabled with "skip-innodb" parameter. Some configuration disabled the innoDB support because use most RAM,
We had a process that crashed while trying to manipulate an expected mysql record set, running the offending query from the mysql cli showed the following.
mysql> SELECT ...;
ERROR 1030: Got error 127 from table handler
Is there a way to easily recreate this condition so we can validate our fix ? (production DB was already repaired).
$ perror 127
OS error code 127: Key has expired
MySQL error code 127: Record file is crashed
The cause is most probably a corrupted MyISAM table ... I don't think it's possible to reproduce, unless you actually know how to provoke that corruption :/