First, you should create a MySQL user for osCommerce to use. It's bad practise to use the root user/pass for a web application.
In a shell on the machine with the MySQL on it, do:
mysql -u root -p
Enter the root password you previously specified. This gets you a prompt which has full access to your mysql server.
Now, pick a database name - it doesn't matter what it is really so long as it's unique on the mysql server (to see existing ones: SHOW DATABASES;
)
When you've decided on it:
CREATE DATABASE dbname;
For example, I'd probably just pick oscommerce
.
Now you have to give a new user access to that database. Pick a username and password (the username can be oscommerce
again, but make a secure password) - replace dbname
here with what you chose a second ago:
GRANT ALL ON dbname.* TO username IDENTIFIED BY 'password';
Done. Now you have the details to put into your webform; the servername is just localhost
or 127.0.0.1
(assuming the webserver is the same machine as the MySQL server), the user and password you just made, the database name is whatever you replaced dbname
with. Port can be left empty.