Post by LuigiRotta » Fri Jul 12, 2024 4:07 pm

Hello

I'm trying to install 4.0.2.3

Configuration fails with
Error: Could not make a database link using h221889_user01199@localhost!
Message: Access denied for user 'h221889_user01199'@'localhost' (using password: YES)

DB Driver MYSQLi, 8.0
Hostname localhost
Username and Password as used in the myPHP, read and write, external
Database Name correct, no prefix, Port 3307

Anything else overseen?

Thanks for any help.
Luigi

Newbie

Posts

Joined
Sun Nov 19, 2023 6:18 am

Post by BrilliantWebDesign » Mon Jul 15, 2024 5:30 am

Hi Luigi,

Make sure your MySQL user h221889_user01199 has the necessary permissions to access, read & modify the database.; you can grant privileges with the command GRANT ALL PRIVILEGES ON your_database_name.* TO 'h221889_user01199'@'localhost' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES;.

If that doesn't work review the error logs and provide us with more info. You can view MySQL error logs by accessing the log files typically located at /var/log/mysql/ or /var/log/mysqld.log

Brilliant Web Design
E-commerce / OpenCart Developer | Online Shops



Posts

Joined
Mon Jul 15, 2024 4:51 am
Location - Rowley Regis, UK

Post by nemesa1 » Mon Jul 29, 2024 3:16 pm

Hey,
I'm trying to run OC 4.0.2.3 in a docker container.
Everything woks fine while I use 3306 for MySql port, but if I expose the port as 3307 (as 3306 is already used by another server) and I'm trying to run the CLI installer I get this error:

Code: Select all

Error: Could not make a database link using opencartweb@demo-shop-MySql-server!
I'm running the CLI installer like this inside the website’s container:

Code: Select all

php /var/www/html/install/cli_install.php install --username admin --password xxx --email admin@email.com --http_server http://192.168.212.13:61012/ --db_driver mysqli --db_hostname demo-shop-MySql-server --db_username opencartweb --db_password yyy --db_database open_cart --db_port 3307 --db_prefix oc_
before I run the CLI I connect to the MySql server on 3307 and run

Code: Select all

CREATE USER 'opencartweb'@'%' IDENTIFIED BY 'yyy';
GRANT ALL PRIVILEGES ON open_cart.* TO 'opencartweb'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
the /var/log/mysqld.log is empty in the mySql container

Please note that, as I mentioned the installer is working fine for 3306, I'm only changing the exposed port number of the mySql container and then change the CLI input.

Thanks is advance for any advice!
Andras
Last edited by nemesa1 on Mon Jul 29, 2024 3:24 pm, edited 2 times in total.

Newbie

Posts

Joined
Mon Oct 02, 2023 9:13 pm
Who is online

Users browsing this forum: No registered users and 3 guests