I have a live site I’ve migrated from Liquid Web into Local. When I stop the site on Local, I get the error message:
Uh-oh! Local ran into an issue while exporting [my url] database to the site’s “app/sql” directory.
Log reads:
Aug 21, 2019, 2:24 PM EDT - info: [main/stopSite] Stopping site: running mydumper
Aug 21, 2019, 2:24 PM EDT - error: [main/exportDB]
{ message:
'mysqldump: Got error: 1449: The user specified as a definer (\'s1\'@\'localhost\') does not exist when using LOCK TABLES',
stack:
'Error: mysqldump: Got error: 1449: The user specified as a definer (\'s1\'@\'localhost\') does not exist when using LOCK TABLES\n at (anonymous function).(anonymous function) (/Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/exporters/ExporterLocal.js:1:2864)\n at process._tickCallback (internal/process/next_tick.js:68:7)' }
Aug 21, 2019, 2:24 PM EDT - info: [main/stopSite] Stopping site: stopping container 1e36a4dbc82c2b28c92bc429473f446ae2c4404703f16512f7005f3513d04de4
That error looks like there might not be a MySQL database user with the correct credentials, or possibly there is a table or view that needs more privileges in order to be set up correctly.
I think that you might need to log into the site and update the users and permissions for the tables of the database. To do this:
Take a backup first!
Right-click on the site and select “Open site SSH”
Log into MySQL by typing: mysql
Execute a sql statement to create a new s1 user and give them the permissions to work with the site. I think that this should work, but that’s also why we had you take a backup!
CREATE USER 's1'@'localhost' IDENTIFIED BY 'complex-password';
GRANT ALL PRIVILEGES on local.* to s1@localhost identified by 'complex-password';
FLUSH PRIVILEGES;
Couple of things to note in the above command: s1 is the username in the above error message and complex-password is whatever secure password you would like for this user.
Let me know how that goes, or if you have any other questions!