Post by gilangramdhan » Thu Apr 11, 2013 4:50 am

c47 wrote:Here's the solution for cases when changing MySQL password is not an option:


Open /install/controller/step_3.php and change (line 218):

Code: Select all

if (!$connection = @mysql_connect($this->request->post['db_host'], $this->request->post['db_user'], $this->request->post['db_password'])) {
to this

Code: Select all

if (!$connection = @mysql_connect($this->request->post['db_host'], $this->request->post['db_user'], 'PASSWORD')) {
where PASSWORD is of course to be replaced by your crazy non-standard password.


Now open /install/model/install.php and change (line 4):

Code: Select all

$db = new DB('mysql', $data['db_host'], $data['db_user'], $data['db_password'], $data['db_name']);
to this

Code: Select all

$db = new DB('mysql', $data['db_host'], $data['db_user'], 'PASSWORD', $data['db_name']);
again, replace PASSWORD by your MySQL password.


Now do the step 3 again - refreshing it will probably do the trick.

Installation should now finish and you are invited to visit your online shop or administration. Not so fast!


Open both /config.php and /admin/config.php. Passwords in both files probably look something like this:

Code: Select all

define('DB_PASSWORD', 'my<crazypassword&');
Some special characters like & or < got converted into their HTML-safe counterparts. Replace those mutant passwords in both files with the real ones.


Don't forget to delete /install directory!


Now have a beer.
Thanks... this work. maybe need a lot of time if do not find this

Newbie

Posts

Joined
Thu Apr 11, 2013 4:37 am

Post by TomRichter » Fri May 10, 2013 2:53 am

GODADDY _ RESOLUTION (everything can be found in: MYSQL - DATABASE - DETAILS ) !!

Database Driver: MySQL
DATABASE HOST : (CHANGE FROM LOCAL HOST TO HOSTNAME - found in database details)
User: database name and username
Password: Yourpassword (case sensitive)
Database name: database name and username
Prefix : doesnt matter

GOOD LUCK

Newbie

Posts

Joined
Thu May 09, 2013 9:04 am

Post by etarahan » Wed Sep 10, 2014 2:45 pm

Hi every one
Im installing quickstart for my opencart theme but in step 3 i receive this message: Error: Could not connect to the database please make sure the database server, username and password is correct!
I did all above to solve the problem but none of them solved the problem!!
Can any one help me???

Newbie

Posts

Joined
Wed Sep 10, 2014 2:42 pm

Post by Randem » Sat Sep 27, 2014 9:32 am

On GoDaddy with the new cPanel X; you need to be careful to follow these undocumented steps:

1 - Go to MySQL Databases
2 - Create your Database (If it has not already been created)
3 - Go down to MySQL Users Add New User
4 - Add in your User name and Password. The user name MUST be in Caps only. If you use lowercase letters they will be converted to uppercase and you will not be able to log in using the name without all caps.
(Godaddy states the password needs to be less than 8 characters) - Did not test this...
(OpenCart does not allow ANY special characters in the password, only letters and numbers)
5 - Click Create User.
6 - Go to Add User To Database to select the user then click Add. This will bring up a screen where you can add permissions to the user. You will not be able to connect to the database without doing this!
7 - Continue your OpenCart installation

Took a while to figure this out but it will work. Hopefully both GoDaddy and OpenCart will update their documentation to reflect this.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by omer1 » Fri Nov 07, 2014 8:04 am

Wanted to add some info. While creating user for DB, use local host. And enter local host in host filed during open cart installation. Worked for me..

Newbie

Posts

Joined
Fri Nov 07, 2014 8:01 am

Post by waynec444 » Mon Nov 04, 2019 11:34 pm

I realize that this is a very old thread but I found out the problem for me. Maybe it will help others.

A call to my hosting company did the trick. The problem was on their end.

New member

Posts

Joined
Sun Oct 06, 2019 11:53 pm
Who is online

Users browsing this forum: No registered users and 9 guests