I am newbie to Laravel 5 and 6. I have very specific question, solution was developed using laravel and MSSQL server as DB server. Now I want to change Database from MSSQL to MySQL, is there any automated way to achieve this ? Or how cumbersome is this process and what will be the step to achieve this?
Thanks & regards
If with solution, you mean to migrate the logic and don't care about data.
.env
file to use said db, for example:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my-db-name-here
DB_USERNAME=root
DB_PASSWORD=
php artisan config:clear --no-ansi
php artisan cache:clear --no-ansi
composer dump-autoload
php artisan view:clear --no-ansi
php artisan route:clear --no-ansi
php artisan route:list --no-ansi
php artisan migrate --no-ansi
If your project is new, there are no seed, else another useful command would be:
php artisan db:seed --no-ansi
The steps are basically the same as above;
But either you need to follow instructions at: https://www.thegeekstuff.com/2014/03/mssql-to-mysql/
Which shows how to directly copy data from source DB to destination.
Or you will need to: