/
Resetting the database
Resetting the database
Create a backup!
Before resetting the database make sure that you have a backup of your existing database.
Helpful commands:
# backup command: mysqldump -u [username] -p[password] --verbose [name of database] > [filename.backup.sql]
# restore command: mysql -u [username] -p[password] [name of database] < [filename.backup.sql]
The username is "nmsprime" in a standard installation. The password was generated at the time of installation and is located in: /etc/nmsprime/env/global.env at the line "DB_PASSWORD="
You can use this command to display the password:
# Look for the database password: cat /etc/nmsprime/env/global.env | grep "DB_PASSWORD"
Between the -p and the password is no space-character! If your passwort is "hello1234", then this part of the command will be: -phello1234
Steps for dropping and creating the database
# drop your existing databases and create the databases again mysql -u root -p[your mysql root password] -e "DROP DATABASE nmsprime; DROP DATABASE nmsprime_ccc; CREATE DATABASE nmsprime CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci'; CREATE DATABASE nmsprime_ccc CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';" # change directory to the nmsprime folder cd /var/www/nmsprime/ # use php artisan to start the migration-process php artisan migrate php artisan module:migrate
Troubleshooting
Related: Database Setup
, multiple selections available,
Related content
Backup Strategy
Backup Strategy
More like this
Database Setup
Database Setup
More like this
MySQL
More like this
Login
More like this
Setting up the system
Setting up the system
More like this
Login via SSH
Login via SSH
More like this