drupal moving from local host to live server - error Error
The website encountered an unexpected error. Please try again later.
Error message

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' in lock_may_be_available() (line 167 of /httpdocs/includes/lock.inc).


I am getting the above error after deploying a website on server. 

Basically, I created a Drupal website on local server. After finishing it, I generate the database script and run it on live server using phpmyadmin. and then I upload and files on server and change the setting file for database connectivity. 

Once I tried to access the website, I am getting the above error like I said before.

I find this solution. but because I am running a dedicated server and don't want to update phpmyadmin. So, I am looking for way around. 

clue
When creating database exports, the tables are usually locked to ensure that there are no attempts to access or change data within the tables while they are being exported and imported. Those locks will usually be released at the end of the import process. That obviously did not happen for your database.

Most likely your database import in phpmyadmin timed out and did not complete the import process. Check the tables available in phpmyadmin and see if there are the same number of tables as on your local server. If the data appears to be properly intact on the production server, then you will need to manually unlock the tables.