Jump to content

Database Server is not found. Please verify the login, password and server fields (DbPDO)


webthinkers

Recommended Posts

Getting this error time and again for PS 1.7.7.5 PHP 7.1 Ubuntu 20.04 Versions

Tried to make a new database , user from phpmyadmin also, but this error is not going away, earlier we tried command in SSH, created those database successfully.

mapping database is so frustrating.

Is there a solution to this?

Edited by webthinkers (see edit history)
Link to comment
Share on other sites

2 minutes ago, SmartDataSoft said:

@webthinkers

Can you please check your database sever name, user name and password is correct or not. The error looks the database server this filed is not matching.

If you send me site information. i can check and help you

Thank you

They are all correct, checked so many times again and again

Link to comment
Share on other sites

On 7/16/2021 at 4:44 AM, webthinkers said:

Getting this error time and again for PS 1.7.7.5 PHP 7.1 Ubuntu 20.04 Versions

 

6 hours ago, webthinkers said:

In XAMPP Control Panel the services of Apache and MySql is running.

Please clarify: You are working to make PS work on Ubuntu Server o on your home PC Windows?

 

Edited by Nickz (see edit history)
Link to comment
Share on other sites

9 minutes ago, Nickz said:

 

Please clarify: You are working to make PS work on Ubuntu Server o on your home PC Windows?

 

Making PS site on Ubuntu server , tried so many times making DB and user with Linux commands, all time successfully made , while installing the PS find troubling with database mapping, so tried XAMPP out of desperation, but not working either.

Link to comment
Share on other sites

16 minutes ago, webthinkers said:

Making PS site on Ubuntu server , tried so many times making DB and user with Linux commands,

You need to give (grant) the User rights. GRANT ALL PRIVILEGES it is called in Mysql

Then you modify the /parameters.php in 1.7.x

For PrestaShop versions 1.7.x onward the config file location is:

“Your PrestaShop store folder/app/config/parameters.php”

or settings.php in 1.5.x & 1.6.x

For PrestaShop versions 1.5.x and 1.6.x the config file location is:

“Your PrestaShop store folder/config/settings.inc.php”

Note: Don’t forget to backup the file before editing and keep it in safe place.

Did you satisfy all requirements Prestashop demands in order to work?

Edited by Nickz (see edit history)
Link to comment
Share on other sites

11 minutes ago, Nickz said:

You need to give (grant) the User rights. GRANT ALL PRIVILEGES it is called in Mysql

Then you modify the /parameters.php in 1.7.x

For PrestaShop versions 1.7.x onward the config file location is:

“Your PrestaShop store folder/app/config/parameters.php”

or settings.php in 1.5.x & 1.6.x

For PrestaShop versions 1.5.x and 1.6.x the config file location is:

“Your PrestaShop store folder/config/settings.inc.php”

Note: Don’t forget to backup the file before editing and keep it in safe place.

Did you satisfy all requirements Prestashop demands in order to work?

Done all this below:

CREATE DATABASE databasename;

CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'StrongPassw@rd';


GRANT ALL PRIVILEGES ON `databasename`.* to `username`@localhost;

FLUSH PRIVILEGES;

EXIT;

Edited

/etc/php/7.3/cli/php.ini
Change memory_limit value to 128M or suitable
upload_max_filesize = 32M or suitable

sudo chown -R www-data: /var/www/html/prestashop/

Edit that file also

sudo nano /etc/apache2/sites-available/prestashop.conf

<VirtualHost *:80>
ServerAdmin admin@your_example.com ( changed )
ServerName your_example.com ( Changed )
ServerAlias www.your_example.com ( changed )
DocumentRoot /var/www/html/prestashop

<Directory /var/www/html/prestashop>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog /var/log/apache2/prestashop-error_log
CustomLog /var/log/apache2/prestashop-access_log common
</VirtualHost>

sudo a2ensite prestashop.conf

I hope this is all, after that PS installation has started and stuck on DB mapping. :(

Link to comment
Share on other sites

7 minutes ago, webthinkers said:
CREATE DATABASE databasename;

CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'StrongPassw@rd';


GRANT ALL PRIVILEGES ON `databasename`.* to `username`@localhost;

FLUSH PRIVILEGES;

EXIT;

That opens a few questions:

Did that work?

Mysql in its newer versions don't use FLUSH PRIVILEGES; also php 7.3 is for 1.7.7. while php7.2 is for 1.7.5 ~ 1.7.6

https://stackoverflow.com/questions/36463966/mysql-when-is-flush-privileges-in-mysql-really-needed

To find out which php version you are running you have done what exactly?

Have you set up a virtual server?

Requirements:

CURL. The Client URL extension is used to download remote resources like modules and localization packages.

DOM. The DOM extension is needed to parse XML documents. PrestaShop uses it for various functionalities, like the Store Locator. It is also used by some modules, as well as the pear_xml_parse library.

Fileinfo. The File information extension is used to find out the file type of uploaded files.

GD. The GD extension is used to create thumbnails for the images that you upload.

Iconv. The ICONV extension is used to convert character sets.

Intl. The Internationalization extension is used to display localized data, such as amounts in different currencies.

JSON. The JSON extension is used to manage JSON format.

Mbstring. The Multibyte string extension to perform string operations everywhere.

OpenSSL. The OpenSSL extension is used to improve security.

PDO. The PHP Data Objects extension is used to connect to databases.

PDO (MySQL). The PDO_MYSQL driver is used to connect to MySQL databases.

SimpleXML. The SimpleXML extension is used to manage XML files.

Zip. The Zip extension is used to expand compressed files such as modules and localization packages.

Edited by Nickz (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Hello. I tried everything on this thread, from top to bottom, and it's not working.

The extensions are there, PS isn't throwing any errors in the UI or in the error and access logs, the credentials are all correct because I can log in to mysql CLI with them.

I even have a prestashop 1.7 and drupal 8 already installed using this same exact mysql database server and they work with no issues.

I did not find anything useful in my installation notes. I have necessary priviledges for the login I use for the DB.

Any other ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...