Hi,
I am trying to get sailed (a CLI tool that generates a Wordpress site and deploys it to hosting) to work with Local WP. The issue is as follows.
- Local WP sets MYSQL User/Pass to be root/root, for the database ‘local’
- Sailed sets MYSQL User/Pass to be wordpress/[very long string] for the database, ‘wordpress’
These tools both override wp-config.php
.
The solution that came to me was to do this (as a note - do not execute this code for anyone reading).
- Update the User/Pass for local
use mysql;
update user set user='wordpress' where user='root';
update user set authentication_string=PASSWORD('[very long string]') where user='wordpress';
flush privileges;
- Update the MYSQL
my.cnf.hbs
config for local
user = wordpress
password = [very long string]
- Import the database
local.sql
to the sailed version using
wp db import path/to/local.sql
The issue is, the first command does not work, saying there is a line error, which then logs me out of MySQL, and I can’t then log back in using the new or old credentials. The SQL import doesn’t work either. I get this error.
Error: Import file missing or not readable:
path/to/app/sql/local.sql
Do you know where I am going wrong?