Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm experimenting with osCommerce, an e-commerce suite, for which I installed the LAMP stack using tasksel. It did ask for a "root password" for MySQL, but other that that I did not pay attention to the installation procedure. Now I'm faced with the following screen, with no idea with what goes where:

enter image description here

So my question is what are the default options, and how do I find all the details?

share|improve this question
    
Maybe the default values are the same as here: library.linode.com/web-applications/e-commerce/oscommerce/… –  Nicolas Raoul Nov 16 '12 at 10:28

3 Answers 3

up vote 2 down vote accepted

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.

share|improve this answer

Database server: 127.0.0.1 (if it is on the same computer, else the ip address of the remote host)

user name: ny MySQL user name. If you just set up mysql you should login to mysql on the local host and setup a user for your project (use the mysql commant in terminal). I do not suggest to use the database root user, however, this should work as well:

mysql -u root -p

follow these instructions:

adding users

Password: the password of the user specified before

Database Name: on your mysql database server there exists no database. So again, login into mysql, but this time with the user you just created. Then follow these instructions to generate a database. You then have to fill in the database name in your form:

Create Database

Database Server Port: leave empty should work. Keep the other settings as they are.

share|improve this answer
    
I assumed, that you have basic SQL knowledge. If not ask again as a comment! –  Michael K Nov 21 '11 at 11:43
1  
sorry Michael I basically duped your answer, but it took me ages to type so I'm leaving it if that's ok :p –  Caesium Nov 21 '11 at 11:48
    
you are a slow-typer :-D pwned –  Michael K Nov 21 '11 at 12:09
    
You should summarize the steps in your answers, like @Caesium did, instead of just linking to avoid issues with link rot. The links can be mentioned in the end as references. (Personally, I like to avoid traversing and reading through linked articles if the instructions are already there (unless I want to know the details), so I'll refer to Caesium's answers for the steps) –  Oxwivi Nov 21 '11 at 12:20
    
unsure about this... the link is official mysql homepage, which ensures, that the information keep up to date on change. Further I want to encourage users, to read the background and find out how it works, instead of stupid copy and paste of commands. –  Michael K Nov 21 '11 at 13:24

If you dont know the password, maybe it is just blank. If dont, to reset the root password you can follow this guide: MySQL Doc. Database server is localhost unless you have osCommerce and MySQL in different machines. For username you could use root, but if you use this in a production environment, using a more limited user will be better. Password is the password you choose during reset process. To create the database, you can login to mysql (remove -p switch if password is blank):

mysql -u root -p

And then use the following statement to show the databases in the system:

mysql > CREATE DATABASE the_name_you_want; 

Server port is 3306.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.