Errors occurred during installation A database error has occurred: Can't create database 'ojs'; database exists

hi, I am new user of OJS, i am installing OJS, but during the installation i got the following error

Errors occurred during installation
A database error has occurred: Can’t create database ‘ojs’; database exists

Hi @brc,

If you’ve already created a database called ojs, uncheck the “create a database” checkbox on the installation form. That’ll cause OJS to use the existing database. (If that database is already in use by another installation of OJS, beware that it will cause problems and you should choose another database name!)

Regards,
Alec Smecher
Public Knowledge Project Team

now I am getting the following error
DB Error: Duplicate entry ‘admin’ for key ‘users_username’

I am installing first time, ( but I tried many time to create my journal at
same page http://localhost/ojs/index.php/index/install/install).

Hi @brc,

It sounds like you’re trying to run the installer over an already-populated database. The database should be empty when you run the installer on it.

Regards,
Alec Smecher
Public Knowledge Project Team

I am delete all and install again OJS and local server, but the problem is
still here, please advise steps to fix it. Please advise how I can check
the data base detail also two folder is created (journal, site) in files
folder.

Hi @brc,

Deleting all files from your OJS installation won’t affect the database; it lives elsewhere. To delete and recreate a MySQL database you’ll have to use DROP DATABASE ... and CREATE DATABASE ... SQL statements, or a tool like phpMyAdmin.

Regards,
Alec Smecher
Public Knowledge Project Team

today I install XAMPP and OJS, I keep ojs folder in root directory
of C:\xampp\htdocs and create a new folder at C:\xampp\files

on very first running the http://localhost/ojs/index.php/index/index, it
works but did not complete the journal installation, I received the message
that

This page isn’t working

localhost is currently unable to handle this request.
HTTP ERROR 500

Please advise how to fix it?

Hi @brc,

Check your PHP error log.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello

I have the same problem, do you already fix it?