McCozza Posted March 24, 2014 Posted March 24, 2014 Hi, I have a number of websites using the mysql database. Using mysqlphpadmin the tables seem to be OK. I think for quite a few weeks I am unable to make a connection between my server php code and the database. Seems to me some kind of reset may be required but not sure if I have any rights to do that. Can you help? Thanks
anush Posted March 25, 2014 Posted March 25, 2014 I recommend you to check whether the connection to MySQL is working properly and please post your domain name and server so Admin's can take a look at it. Please post how you are making the mysqlconnect.
McCozza Posted March 25, 2014 Author Posted March 25, 2014 I can connect using cpanel mysql phpadmin, but my website returns these kind of errors upon any interaction with the database "PDOException: SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine: INSERT INTO {watchdog}...", The website server code makes the connection using PHP. Can't remember exact syntax as it's Drupal core code which has worked on thousands of websites for many years. domain name is herts.heliohost.org, server is stevie I think. Cpanel users where I'm having problems are brunik and shali Cheers Nick
McCozza Posted March 25, 2014 Author Posted March 25, 2014 Actually I've got problems with 2 sites whose details are as follows: 1. domain: west-herts-squash.heliohost.org, server: stevie2. domain: herts.heliohost.org, server: stevie Thanks, Nick
anush Posted March 25, 2014 Posted March 25, 2014 I think the username and the password for the database is changed or the database does not exist, try to reinstall Drupal.
McCozza Posted March 25, 2014 Author Posted March 25, 2014 how come, from cpanel, I'm able to connect and verify the databases using myphpadmin? I can see that the tables look perfectly OK.
paladox2014 Posted March 29, 2014 Posted March 29, 2014 when stevie crashed all the database on it crashed and made it corrupt. to fix it delete all the tables in your database and recreate them making sure you back them if you carnt just try using your last backup of it.
luisfeser Posted March 30, 2014 Posted March 30, 2014 when stevie crashed all the database on it crashed and made it corrupt. to fix it delete all the tables in your database and recreate them making sure you back them if you carnt just try using your last backup of it. Is there any howto for newbies to do this? i think i have same problem and I don't know how to fix it. I don't care to loose data, i only want to install drupal or whatever i want. Thanks a lot
McCozza Posted April 16, 2014 Author Posted April 16, 2014 Hi, I'm not sure my problem is to do with my databases being corrupt after Stevie crashed. I created a new database using cpanel/phpmyadmin and when I tried to install my drupal website when I got to the database config section I was unable to access the new database. So there seems to be some connection problem to the databases on Stevie. Is there any way I can test this? Thanks, Nick
wolstech Posted April 16, 2014 Posted April 16, 2014 Does it say if it was an access denied error or an error 2002? Error 2002 ("Cannot connect to the mysql server") is related to the crash. Access denied means your database user doesn't exist, isn't assigned to the database, or the password is incorrect. It is also worth noting that it is currently not possible to install Drupal from the distribution package or from softaculous on Stevie due to the damage, and many existing installs stopped working right due to their reliance on InnoDB and the now-frequent database server downtime.
McCozza Posted April 17, 2014 Author Posted April 17, 2014 The error I get is "SQLSTATE[HY000] General error: 2013 Lost connection to MYSQL server during query". I am not getting 'access denied'. For this particular install I created a new database 'shali_croxley' and created a new user 'shali_croxley' using the cpanel 'mysql databases' and cpanel phpmyadmin. So what do you recommend is the best plan of action? Use a differerent helio server? Not use InnoDB? Or just give up on heliohost and find a different web server hosting? Cheers Nick
wolstech Posted April 17, 2014 Posted April 17, 2014 Error 2013 is due to the crash. It occurs when you try to do things to innodb tables, like create or drop them. Best course of action is to just not use innodb tables. MyISAM is working normally. If you have to use them, you can move to Johnny, although it goes down quite a bit due to load.
McCozza Posted April 20, 2014 Author Posted April 20, 2014 Hi, Great, thanks for your advice, I'm getting somewhere. I created a fresh database and then tweaked Drupal install core file to use MyISAM instead of InnoDB. It has now installed OK on a website that no one uses. Now I'm going to alter the tables on a website that is also not used to use MyISAM. If that works I will tackle the 2 websites that are used. Hopefully just altering the tables will to the trick so I don't have to do fresh installs from my backed up data. Any advice on the altering tables. I'm just planning to use 'mysqlshow db' to dump the tables and then produce an .sql file that I can redirect into database using mysql. e.g mysql -u nick -p shali_crox < alter.tables.sql > err Thanks Nick
wolstech Posted April 20, 2014 Posted April 20, 2014 The way we recommend you convert innodb tables to myisam is to make a backup as an sql file, replace all of the ENGINE=InnoDB with ENGINE=MyISAM in the backup SQL file, import it into a blank database, then edit your application Config to use that new database. Last i tried, attempting to use ALTER on the existing tables to change engine doesn't seem to work. Also don't bother trying to drop databases with innodb tables in them, since doing so wont succeed and will crash the MySQL server for everyone on the server...and it takes 10 minutes for it to restart.
paladox2014 Posted April 20, 2014 Posted April 20, 2014 Hi I thought MyISAM gets corrupted more often then innodb and that innodb is recommended to be used then MyISAM.
Recommended Posts