Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1014  / 2 Years ago, thu, october 27, 2022, 10:42:46

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?


More From » mysql

 Answers
7

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.


[#41917] Saturday, October 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bblerest

Total Points: 240
Total Questions: 119
Total Answers: 113

Location: Wallis and Futuna
Member since Mon, May 18, 2020
4 Years ago
bblerest questions
Sun, Apr 16, 23, 13:50, 1 Year ago
Fri, Nov 4, 22, 06:21, 2 Years ago
Tue, Sep 27, 22, 12:22, 2 Years ago
;